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

ddl: Global index more restrictions #55440

Merged
merged 7 commits into from
Aug 15, 2024

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Aug 15, 2024

What problem does this PR solve?

Issue Number: close #55424

Problem Summary:
GLOBAL IndexOption was allowed on non-partitioned tables, non-unique indexes, as well as on indexes including all partitioning columns.

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 15, 2024
@mjonss mjonss requested a review from Defined2014 August 15, 2024 09:31
Copy link

tiprow bot commented Aug 15, 2024

Hi @mjonss. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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.

Copy link
Contributor

@Defined2014 Defined2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Another question, what about create table t(a int, unique index idx(a) local)? Thougth it won't cause any problem, it looks weird.

pkg/ddl/executor.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 15, 2024
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 15, 2024
@mjonss
Copy link
Contributor Author

mjonss commented Aug 15, 2024

LGTM

Another question, what about create table t(a int, unique index idx(a) local)? Thougth it won't cause any problem, it looks weird.

@Defined2014 local should just be ignored, I just added it to be compatible with Oracle Syntax, it is just the same as not specifying it. Only global is a difference from the default (local).

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 15, 2024
Copy link

ti-chi-bot bot commented Aug 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-15 09:37:56.154559744 +0000 UTC m=+433560.858029399: ☑️ agreed by Defined2014.
  • 2024-08-15 09:55:01.377617847 +0000 UTC m=+434586.081087489: ☑️ agreed by tangenta.

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 8 lines in your changes missing coverage. Please review.

Project coverage is 75.5093%. Comparing base (c74a233) to head (d357a2e).
Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55440        +/-   ##
================================================
+ Coverage   74.9176%   75.5093%   +0.5917%     
================================================
  Files          1576       1576                
  Lines        365707     442161     +76454     
================================================
+ Hits         273979     333873     +59894     
- Misses        71965      87615     +15650     
- Partials      19763      20673       +910     
Flag Coverage Δ
integration 50.5943% <84.6153%> (?)
unit 71.8597% <32.6923%> (-2.0484%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 63.0249% <ø> (+15.2065%) ⬆️

Copy link

ti-chi-bot bot commented Aug 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 15, 2024
@ti-chi-bot ti-chi-bot bot merged commit 2045418 into pingcap:master Aug 15, 2024
22 checks passed
@mjonss mjonss deleted the global-index-more-restrictions branch August 15, 2024 13:55
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.3: #55451.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.3 release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can create global index with partition columns
4 participants