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: migrate part of ddl package code from Execute/ExecRestricted to safe API (2) #22729

Merged
merged 7 commits into from
Feb 5, 2021

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Feb 4, 2021

Signed-off-by: AilinKid [email protected]

What problem does this PR solve?

Issue Number: part close #pingcap/tidb-test#1152

What is changed and how it works?

What's Changed:
Migrate part of code in ddl package from using Execute/ExecRestricted to safe API

Attention:
1: Since partitionDef.Expr string may contain the identifier, we won't pass it as a parameter but write it to SQL string directly.
2: Since the condition string in partitionDef.less-than field contains the quotation ", so trimming need be done before it passed as a string parameter.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • No code

Release note

  • ddl: migrate part of ddl package code from Execute/ExecRestricted to safe API (2)

@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Feb 4, 2021
Copy link
Contributor

@xhebox xhebox left a comment

Choose a reason for hiding this comment

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

Rest LGTM

ddl/partition.go Outdated Show resolved Hide resolved
@AilinKid AilinKid requested a review from morgo February 5, 2021 03:47
Copy link
Contributor

@xhebox xhebox 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 5, 2021
@tiancaiamao
Copy link
Contributor

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Feb 5, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Feb 5, 2021
@tiancaiamao
Copy link
Contributor

/merge

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

/run-all-tests

@ti-srebot
Copy link
Contributor

/run-all-tests

@AilinKid
Copy link
Contributor Author

AilinKid commented Feb 5, 2021

/run-tics-test

1 similar comment
@AilinKid
Copy link
Contributor Author

AilinKid commented Feb 5, 2021

/run-tics-test

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Feb 25, 2021
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #22935

@ti-srebot
Copy link
Contributor

cherry pick to release-5.0-rc in PR #22936

@ti-srebot
Copy link
Contributor

cherry pick to release-3.0 in PR #22937

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/LGT2 Indicates that a PR has LGTM 2. type/2.1-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants