-
Notifications
You must be signed in to change notification settings - Fork 6.1k
ddl: check TTL constraints for temporary tables #65246
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
Conversation
|
Hi @cryo-zd. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Hi @cryo-zd. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| if referTblInfo.TTLInfo != nil { | ||
| // for issue #64948, temporary table does not support TLL, we should remove it | ||
| if s.TemporaryKeyword != ast.TemporaryNone { | ||
| tblInfo.TTLInfo = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it'd be better to validate after it builds the table. I'd suggest to add the check in (*DDLExec).createSessionTemporaryTable: if tblInfo.TTLInfo != nil {return dbterror.ErrTempTableNotAllowedWithTTL}.
Because for other cases, create table like and create global temporary table like ON COMMIT DELETE ROWS;, they are also validated after BuildTableInfoWithLike.
|
Good job. I've checked the following case (on tidb master branch): It seems that the |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #65246 +/- ##
================================================
+ Coverage 70.7643% 71.5885% +0.8241%
================================================
Files 1901 1906 +5
Lines 518640 527459 +8819
================================================
+ Hits 367012 377600 +10588
+ Misses 127111 125408 -1703
+ Partials 24517 24451 -66
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
YangKeao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GMHDBJD, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
5 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
What problem does this PR solve?
Issue Number: close #64948
This PR checked TTL constraints and removed them( if set ) when executing statement
create temporary table temp like t;Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.