-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 admin check table / checksum table compatibility for cache table #29096
Conversation
[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 submitting an approval review. |
./rebuild |
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.
Are you sure we need to forbid it? It sounds unreasonable to users. Are there any methods to implement it? @tiancaiamao
sorry. I will turn it into a test cache table supported admin check table / checksum pr. delete invalid modify. and add new test. sorry its my mistake |
Please update the PR title and the description @jayl-zxl |
okay。 |
/run-check_dev_2 |
executor/admin_test.go
Outdated
err := tk.ExecToErr("admin check table cache_admin_test;") | ||
c.Assert(err, IsNil) | ||
err = tk.ExecToErr("admin check index cache_admin_test c1;") | ||
c.Assert(err, IsNil) | ||
err = tk.ExecToErr("admin check index cache_admin_test c2;") | ||
c.Assert(err, IsNil) |
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.
This is just the same with mustExec
. I mean to use tk.MustQuery("admin check table cache_admin_test").Check(testkit.Rows("......"))
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.
oh. i understand now !
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.
Sorry, I found that admin check table
will report ERROR 1105
if the data is inconsistent, so MustExec
is OK.
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.
thks
errno/errname.go
Outdated
@@ -1060,7 +1060,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{ | |||
ErrPlacementPolicyNotExists: mysql.Message("Unknown placement policy '%-.192s'", nil), | |||
ErrPlacementPolicyWithDirectOption: mysql.Message("Placement policy '%s' can't co-exist with direct placement options", nil), | |||
ErrPlacementPolicyInUse: mysql.Message("Placement policy '%-.192s' is still in use", nil), | |||
|
|||
ErrOptOnCacheTable: mysql.Message("`%s` is unsupported on cache tables.", 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.
Why `%s` here when all other places use '%s'?
errors.toml
Outdated
@@ -1486,6 +1486,11 @@ error = ''' | |||
invalid as of timestamp: %s | |||
''' | |||
|
|||
["planner:8242"] | |||
error = ''' | |||
`%s` is unsupported on cache tables. |
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.
Need to update when ErrOptOnCacheTable
is changed.
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.
ok. i have been updated
/run-check_dev_2 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 783265a
|
close #29124 |
What problem does this PR solve?
Issue Number: #29124
Problem Summary:See Optimizing hotspot small tables #25293
What is changed and how it works?
add admin checksum table compatibility and admin check table for cache table
A cache table should support admin check / checksum
so the following operations are allowed
create table t1 (id int)
alter table t1 cache
admin checksum table t1
admin check table t1
Check List
Tests
Release note