-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
types/json: fix an over-quoted bug in BinaryJSON.Unquote
function (#11934)
#11955
types/json: fix an over-quoted bug in BinaryJSON.Unquote
function (#11934)
#11955
Conversation
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry @bb7133, you don't have permission to trigger auto merge event on this branch. |
/run-all-tests |
@sre-bot merge failed. |
/run-common-test |
/run-all-tests |
/run-common-test |
/merge |
/run-all-tests |
cherry-pick #11934 to release-3.0
What problem does this PR solve?
This PR tries to fix the following issue:
In current TiDB(master/3.0/2.1):
In MySQL 5.7/8.0:
What is changed and how it works?
The issue is caused by the over-unquote behaviors of
BinaryJSON.Unquote
: for a string literal of JSON, it should be unquoted only when enclosed by double quotes("
)Check List
Tests
Code changes
Side effects
N/A
Related changes
Release note
Fix an over-quoted bug for
JSON_UNQUOTE
function: only values enclosed by the double quote marks("
) should be unquoted. For example, result ofSELECT JSON_UNQUOTE("\\\\")
should be\\
(not changed).