-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
ddl: add truncate partition all support #23040
Conversation
/cc @bb7133 PTAL |
@AndrewDi: GitHub didn't allow me to request PR reviews from the following users: PTAL. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions 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/test-infra repository. |
releated parser pr is 1179 |
@AndrewDi You need a rebase. There are too many commits coauthored by you. |
d31f476
to
ce7b59a
Compare
@xhebox rebase has been done, sorry for the later response. |
/run-all-tests |
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.
Rest LGTM, but it is a new feature. You should not close the issue until the document is updated.
ddl/db_test.go
Outdated
tk1.MustExec("drop table if exists partition_table;") | ||
}() | ||
tk1.MustExec("create table partition_table (v int) partition by hash (v) partitions 2;") | ||
tk1.MustExec("insert into partition_table values (1);") |
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.
We can make a better test that emphasizes on all partitions:
- partitioning by less than 10 and 20, or so
- insert 8 and 15, to insert into all partitions
- truncate all partitions and
count(*) == 0
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.
PTAL again?
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.
It is fine to me. Plz fix the build, and do not close the issue. I think it is better to leave the issue open for documentation PR.
b73e870
to
a367f43
Compare
/run-all-tests |
/run-check_dev_2 |
There is a failed test in check_dev_2, could you investigate whether it is because of your modifications? @AndrewDi |
No, I didn't touch privileges part, but I will fix the test case, may be some one has modified parser parted, but tidb part has not merged. |
/run-all-tests |
executor/revoke_test.go
Outdated
@@ -82,7 +82,7 @@ func (s *testSuite1) TestRevokeTableScope(c *C) { | |||
|
|||
// Make sure all the table privs for new user is Y. | |||
res := tk.MustQuery(`SELECT Table_priv FROM mysql.tables_priv WHERE User="testTblRevoke" and host="localhost" and db="test" and Table_name="test1"`) | |||
res.Check(testkit.Rows("Select,Insert,Update,Delete,Create,Drop,Index,Alter")) | |||
res.Check(testkit.Rows("Select,Insert,Update,Delete,Create,Drop,Index,Alter,Show View")) |
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.
it this true in MySQL? I haven't tested it.
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.
From mysql-8.0.22
| Select,Insert,Update,Delete,Create,Drop,References,Index,Alter,Create View,Show view,Trigger |
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.
we are not supporting trigger
now, I think it ok here.
/hold |
/unhold |
/cc @zimulala |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
@AndrewDi Please fix the conflicts. And I will fire the merge. |
0bb2afa
to
2e63b48
Compare
done...please merge asap |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2e63b48
|
@AndrewDi: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #22704
Problem Summary:
What is changed and how it works?
What's Changed:
if ddl contains
truncate partition all
, all current partition id will pass toddl_api
How it Works:
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note
all
option