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: Also check column types in ALTER TABLE t PARTITION BY ... #56197

Merged
merged 9 commits into from
Sep 25, 2024

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Sep 20, 2024

What problem does this PR solve?

Issue Number: close #56094

Problem Summary:
There were no checks for partitioning expression type if ALTER TABLE t PARTITION BY ..., like it was for CREATE TABLE t ... PARTITION BY ...

What changed and how does it work?

Added check.

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 release-note-none Denotes a PR that doesn't merit a release note. labels Sep 20, 2024
@mjonss mjonss requested a review from Defined2014 September 20, 2024 10:45
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 20, 2024
Copy link

tiprow bot commented Sep 20, 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

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.8332%. Comparing base (2838cd6) to head (1895e61).
Report is 50 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56197        +/-   ##
================================================
+ Coverage   73.3843%   76.8332%   +3.4488%     
================================================
  Files          1605       1627        +22     
  Lines        445291     460150     +14859     
================================================
+ Hits         326774     353548     +26774     
+ Misses        98464      85443     -13021     
- Partials      20053      21159      +1106     
Flag Coverage Δ
integration 52.9200% <94.4444%> (?)
unit 73.3631% <86.1111%> (+0.8491%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.1438% <ø> (+17.1128%) ⬆️

@mjonss
Copy link
Contributor Author

mjonss commented Sep 20, 2024

/retest

Copy link

tiprow bot commented Sep 20, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Sep 21, 2024
@mjonss
Copy link
Contributor Author

mjonss commented Sep 22, 2024

/retest

pkg/ddl/partition.go Outdated Show resolved Hide resolved
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.

Others LGTM

pkg/ddl/partition.go 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 Sep 24, 2024
pkg/ddl/partition.go Outdated Show resolved Hide resolved
@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 Sep 24, 2024
pkg/ddl/partition.go Show resolved Hide resolved
pkg/ddl/partition.go Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Sep 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, Defined2014

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

ti-chi-bot bot commented Sep 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-24 08:51:01.070918473 +0000 UTC m=+1555930.811342412: ☑️ agreed by Defined2014.
  • 2024-09-25 07:04:41.908568959 +0000 UTC m=+1635951.648992883: ☑️ agreed by D3Hunter.

@mjonss
Copy link
Contributor Author

mjonss commented Sep 25, 2024

/retest

@mjonss
Copy link
Contributor Author

mjonss commented Sep 25, 2024

/retest

1 similar comment
@mjonss
Copy link
Contributor Author

mjonss commented Sep 25, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit cabedbc into pingcap:master Sep 25, 2024
25 checks passed
@mjonss mjonss deleted the alter-partition-by-fix-56094 branch September 27, 2024 07:00
@Defined2014 Defined2014 added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Sep 29, 2024
@Frank945946
Copy link

@mjonss Please cherry-pick it to LTS v6.5, v7.1, v7.5, and v8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. 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.

restrictions on partitioning in CREATE TABLE can be bypass with ALTER TABLE
5 participants