Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 27, 2021

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

model/model.go Outdated Show resolved Hide resolved
parser.y Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
@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

parser.y Outdated Show resolved Hide resolved
@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
model/model.go Outdated Show resolved Hide resolved
@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.

None yet

6 participants