Skip to content

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

Merged
ti-chi-bot merged 5 commits intopingcap:release-5.0-rcfrom
ti-srebot:release-5.0-rc-dedaabb800c4
Mar 9, 2021
Merged

ddl: migrate part of ddl package code from Execute/ExecRestricted to safe API (2) (#22729)#22936
ti-chi-bot merged 5 commits intopingcap:release-5.0-rcfrom
ti-srebot:release-5.0-rc-dedaabb800c4

Conversation

@ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Feb 25, 2021

cherry-pick #22729 to release-5.0-rc
You can switch your code base to this Pull Request by using git-extras:

# In tidb repo:
git pr https://github.com/pingcap/tidb/pull/22936

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/tidb.git pr/22936:release-5.0-rc-dedaabb800c4

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

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)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@AilinKid you're already a collaborator in bot's repo.

ddl/partition.go Outdated
sql = buildCheckSQLForRangeColumnsPartition(pi, index, schemaName, tableName)
sql, paramList = buildCheckSQLForRangeColumnsPartition(pi, index, schemaName, tableName)
}
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Please resolve conflicts

@xhebox
Copy link
Contributor

xhebox commented Mar 9, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 9, 2021
@morgo
Copy link
Contributor

morgo commented Mar 9, 2021

/LGTM

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • morgo
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 9, 2021
@morgo
Copy link
Contributor

morgo commented Mar 9, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 82dd1b2

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 9, 2021
@ti-chi-bot ti-chi-bot merged commit 48b011c into pingcap:release-5.0-rc Mar 9, 2021
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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants