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: fix admin repair table with range partition expr will parseInt fail (#17982) #17988

Merged
merged 7 commits into from
Jul 29, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Jun 12, 2020

cherry-pick #17982 to release-4.0


Signed-off-by: AilinKid 314806019@qq.com

What problem does this PR solve?

Issue Number: close part of #17952

Problem Summary: partition expr will parse int fail while create table directly can be successfully

What is changed and how it works?

How it Works:
in function buildTableInfoWithCheck

checkTableInfoValidWithStmt should do the constant fold the partition expression firstly,
then checkTableInfoValidExtra will pass the tableInfo check successfully secondly.

while create table logic is different with this

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    1: open repair mode and fill the repair list in config.toml
    2: use SQL below to test admin repair action will work well rather than occur parseInt error.
admin repair table test222 CREATE TABLE `test222` ( `bucket_id` VARCHAR(200) NOT NULL DEFAULT 'zhu' COMMENT '分桶id', `creative_id` VARCHAR(32)  COMMENT '创意id',   `day` datetime  COMMENT '日志时间'   ) PARTITION BY RANGE (TO_SECONDS(day)) (    PARTITION p20190414 VALUES LESS THAN (TO_SECONDS('20190414')))

Release note

  • ddl: fix admin repair table with range partition expr will parseInt fail

Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor Author

sre-bot commented Jun 12, 2020

/run-all-tests

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta tangenta added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 12, 2020
@tiancaiamao
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason modified the milestones: v4.0.2, v4.0.3 Jun 19, 2020
@tiancaiamao
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor

Sorry @tiancaiamao, you don't have permission to trigger auto merge event on this branch.

@winoros winoros modified the milestones: v4.0.3, v4.0.4 Jul 15, 2020
@imtbkcat imtbkcat modified the milestones: v4.0.4, v4.0.5 Jul 28, 2020
@zz-jason
Copy link
Member

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 28, 2020
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 18368
  • 17926
  • 17823
  • 18531
  • 18667
  • 18806
  • 18413
  • 18434
  • 18280
  • 18121
  • 18122
  • 18027
  • 18234
  • 18529
  • 18727
  • 18583
  • 18513
  • 17972
  • 17231
  • 18692

@zz-jason
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 18280
  • 18121
  • 18122
  • 18027
  • 18234
  • 18529
  • 18727
  • 18583
  • 18513
  • 17972
  • 17231
  • 18692
  • 18683
  • 18159
  • 17863
  • 17823
  • 18531
  • 18413
  • 18434
  • 18280
  • 18121
  • 18122
  • 18027
  • 18234
  • 18529
  • 18727
  • 18583
  • 18513
  • 17972
  • 17231
  • 18692

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@sre-bot merge failed.

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@sre-bot merge failed.

@zz-jason
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 53af4ef into pingcap:release-4.0 Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bug-fix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants