Skip to content

parser: support the 'create global temporary table' syntax#1211

Merged
coocood merged 1 commit intopingcap:masterfrom
tiancaiamao:temporary-table
Apr 27, 2021
Merged

parser: support the 'create global temporary table' syntax#1211
coocood merged 1 commit intopingcap:masterfrom
tiancaiamao:temporary-table

Conversation

@tiancaiamao
Copy link
Collaborator

What problem does this PR solve?

Support create global temporary table ... on commit delete rows
See pingcap/tidb#24168

What is changed and how it works?

This syntax is compatible with MySQL temporary table, a GLOBAL keyword is used to distinguish them.
This syntax is much the same with Oracle (and also the ANSI SQL standard).

A compatibility issue is that when a user use this syntax and use a downstream MySQL as TiDB backup, they will encounter DDL error when the use this statement, because this syntax is a superset of the MySQL syntax.

In the real use cases, it shouldn't be a problem, because if a user use this syntax, they probably migrating from Oracle, so they do not use a MySQL backup.

Check List

Tests

  • Unit test

Code changes

Related changes

  • Need to be included in the release note

@tiancaiamao
Copy link
Collaborator Author

Integration test is fixed in pingcap/tidb#24196

@tiancaiamao
Copy link
Collaborator Author

I've change OptTemporary to include GLOBAL TEMPORARY now, PTAL @djshow832 @kennytm

@djshow832
Copy link
Contributor

/lgtm

@ti-srebot ti-srebot added the status/LGT1 LGT1 label Apr 27, 2021
@djshow832 djshow832 requested a review from kennytm April 27, 2021 03:44
@coocood
Copy link
Member

coocood commented Apr 27, 2021

/lgtm

@ti-srebot ti-srebot removed the status/LGT1 LGT1 label Apr 27, 2021
ti-srebot
ti-srebot previously approved these changes Apr 27, 2021
@ti-srebot ti-srebot added the status/LGT2 LGT2 label Apr 27, 2021
@bb7133
Copy link
Member

bb7133 commented Apr 27, 2021

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@tiancaiamao merge failed.

@tiancaiamao
Copy link
Collaborator Author

/check-cla

@tiancaiamao
Copy link
Collaborator Author

The license/cal check fails and I try to modify the git history of my commit email, git push -f is used

PTAL @coocood @djshow832

@coocood
Copy link
Member

coocood commented Apr 27, 2021

/lgtm

@coocood coocood merged commit 8e8ed79 into pingcap:master Apr 27, 2021
@tiancaiamao tiancaiamao deleted the temporary-table branch April 27, 2021 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants