Skip to content

Conversation

jiyfhust
Copy link
Contributor

@jiyfhust jiyfhust commented Mar 10, 2024

What problem does this PR solve?

Issue Number: close #51634

Problem Summary:

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 do-not-merge/needs-triage-completed do-not-merge/needs-tests-checked 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. and removed do-not-merge/needs-tests-checked labels Mar 10, 2024
Copy link

tiprow bot commented Mar 10, 2024

Hi @jiyfhust. 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/test-infra repository.

@jiyfhust
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 10, 2024
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Merging #51635 (3c1fe84) into master (15947c1) will increase coverage by 2.1507%.
Report is 64 commits behind head on master.
The diff coverage is 72.4137%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51635        +/-   ##
================================================
+ Coverage   70.7427%   72.8934%   +2.1507%     
================================================
  Files          1473       1476         +3     
  Lines        436986     450128     +13142     
================================================
+ Hits         309136     328114     +18978     
+ Misses       108511     101880      -6631     
- Partials      19339      20134       +795     
Flag Coverage Δ
integration 50.0024% <72.4137%> (?)
unit 70.4842% <37.9310%> (-0.0680%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.1017% <ø> (+5.2321%) ⬆️

@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 Mar 11, 2024
@jiyfhust
Copy link
Contributor Author

/cc @Defined2014 @mjonss @tiancaiamao

Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

Very good catch!

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. and removed do-not-merge/needs-triage-completed labels Mar 12, 2024
Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 12, 2024
@mjonss
Copy link
Contributor

mjonss commented Mar 12, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 12, 2024
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

I found a new case that should be fixed by this PR,
ALTER TABLE t PARTITION BY ... on an already partitioned table, must be checked as well, not only non-partitioned tables.

Comment on lines 4606 to 4607
// Only non-partition table to partition table need to check global index.
if piOld.Type == model.PartitionTypeNone {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Only non-partition table to partition table need to check global index.
if piOld.Type == model.PartitionTypeNone {

I think it needs to be checked for all types, since this is still accepted:

create table t4 (a int primary key, b int) partition by hash(a) partitions 3;
alter table t4 partition by hash(b) partitions 3;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. Updated 6ab2ba1.

@ti-chi-bot ti-chi-bot bot removed the lgtm label Mar 12, 2024
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

Thanks for the updated PR, LGTM.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 13, 2024
@mjonss mjonss removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2024
Copy link

ti-chi-bot bot commented Mar 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, Defined2014, mjonss

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 15, 2024
Copy link

ti-chi-bot bot commented Mar 15, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-12 10:27:59.874966626 +0000 UTC m=+767706.897213012: ☑️ agreed by mjonss.
  • 2024-03-12 13:26:11.588397368 +0000 UTC m=+778398.610643756: ☑️ agreed by Benjamin2037.
  • 2024-03-12 13:46:32.23090198 +0000 UTC m=+779619.253148369: ✖️🔁 reset by mjonss.
  • 2024-03-13 11:45:58.429650773 +0000 UTC m=+858785.451897159: ☑️ agreed by mjonss.
  • 2024-03-15 06:39:54.019456691 +0000 UTC m=+1013221.041703079: ☑️ agreed by Defined2014.

@ti-chi-bot ti-chi-bot bot merged commit e8ff3c0 into pingcap:master Mar 15, 2024
@jiyfhust jiyfhust deleted the fix_alter_partition_global_index branch March 15, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alter table t partitioning with unique index which not include partition columns should be forbiden
4 participants