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

expression: fix compare string with hex string literal makes tidb panic #26964

Closed
wants to merge 3 commits into from

Conversation

xiongjiwei
Copy link
Contributor

@xiongjiwei xiongjiwei commented Aug 6, 2021

What problem does this PR solve?

Issue Number:
close #23507
close #23506

Problem Summary:

What is changed and how it works?

if the function's arguments are constant and string type, we should check its validity, so that this pr will eval string expression at getfunction phase if the argument is constant and string type and some error arise earlier, see the changed tests.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

make illegal collation check more strictness

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 6, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 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.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 6, 2021
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 9, 2021
@xiongjiwei xiongjiwei force-pushed the compare-binary-panic branch 2 times, most recently from 44e487f to 41c5476 Compare August 9, 2021 09:26
@ti-chi-bot ti-chi-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 Aug 9, 2021
@xiongjiwei xiongjiwei marked this pull request as ready for review August 9, 2021 11:43
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 9, 2021
@xiongjiwei xiongjiwei requested review from a team, lzmhhh123 and XuHuaiyu and removed request for a team, lzmhhh123 and XuHuaiyu August 9, 2021 11:50
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 9, 2021
@ichn-hu ichn-hu mentioned this pull request Aug 9, 2021
expression/integration_test.go Outdated Show resolved Hide resolved
expression/builtin.go Outdated Show resolved Hide resolved
expression/builtin.go Outdated Show resolved Hide resolved
expression/builtin.go Outdated Show resolved Hide resolved
expression/builtin.go Outdated Show resolved Hide resolved
@xiongjiwei xiongjiwei changed the title expression: fix compare string with hex string literal panic expression: fix compare string with hex string literal makes tidb panic Aug 10, 2021
@xiongjiwei
Copy link
Contributor Author

/run-build

expression/typeinfer_test.go Show resolved Hide resolved
expression/integration_test.go Outdated Show resolved Hide resolved
@xiongjiwei
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2021
@wshwsh12 wshwsh12 removed the request for review from a team August 31, 2021 07:19
@ti-chi-bot
Copy link
Member

@xiongjiwei: PR needs rebase.

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.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2021
@xiongjiwei xiongjiwei closed this Sep 10, 2021
@xiongjiwei xiongjiwei deleted the compare-binary-panic branch September 23, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
4 participants