-
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
*: Require GLOBAL IndexOption for creating Global Index #55264
*: Require GLOBAL IndexOption for creating Global Index #55264
Conversation
Hi @mjonss. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55264 +/- ##
================================================
+ Coverage 74.7860% 75.6112% +0.8251%
================================================
Files 1570 1580 +10
Lines 364854 449034 +84180
================================================
+ Hits 272860 339520 +66660
- Misses 72285 88722 +16437
- Partials 19709 20792 +1083
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…lobal-index-option
…lobal-index-option
…lobal-index-option
…lobal-index-option
…lobal-index-option
/retest |
@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
/retest |
@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
idxOffset := -1 | ||
for i := range tbInfo.Indices { | ||
if strings.EqualFold(tbInfo.Indices[i].Name.L, idxUpdate.Name) { | ||
idxOffset = i |
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.
Should we check is commonHandle here?
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.
Not sure, it is checked in the next loop over tbInfo.Indices, and will fail if CommonIndex and global index is needed for the same index.
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 for the optimizer part
[LGTM Timeline notifier]Timeline:
|
/retest |
@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, qw4990, tangenta The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
What problem does this PR solve?
Issue Number: close #52994
Building upon #55259, which is the Parser change needed for this PR.
Problem Summary:
To not surprise our users and create MySQL incompatibilities, we should require explicit mentioning of 'GLOBAL' when creating a Global Unique Index.
This also makes it easier to allow non-unique indexes as well as unique indexes already containing all partitioning columns to be GLOBAL.
Currently ALTER TABLE t PARTITION BY ... would implicitly create a Global Index of UNIQUE Indexes if they don't include all partitioning columns.
With this PR we are adding an optional UPDATE INDEXES clause after the partitioning definitions:
UPDATE INDEXES ( index_name {GLOBAL|LOCAL} [, index_name {GLOBAL|LOCAL}[,...]] ) to make every index change explicit.
What changed and how does it work?
DDL:
Executor:
Table:
Added a new error for needing Global Index, but is not explicitly given.
Most changes are just updated tests and results, to comply with the new requirement of explicitly mention GLOBAL.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.