-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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, expression: fix some string functions' flen and refine error message for expression index #27376
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
expression/builtin_string.go
Outdated
// Max length is (64 * 2 -1) * 4 | ||
// For example: | ||
// "Y,Y,Y,Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N" | ||
bf.tp.Flen = 508 |
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.
What will happen if arg[1]/arg[2] is too long?
I think using the formula in mysql is better.. https://github.com/mysql/mysql-server/blob/8.0/sql/item_strfunc.cc#L3646
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.
OK, I will fix it.
/run-check_dev_2 |
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.
Rest LGTM
@wshwsh12: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this: 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 ti-community-infra/tichi repository. |
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.
Rest LGTM
if len(args) > 3 { | ||
sepL = args[3].GetType().Flen | ||
} | ||
bf.tp.Flen = (l*64 + sepL*63) * 4 |
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.
any calculation reference link for this?
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.
Refer to @wshwsh12 's comment.
/merge |
@wjhuang2016: In response to this:
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 ti-community-infra/tichi repository. |
/merge |
1 similar comment
/merge |
/run-check_dev_2 |
/run-check_dev_2 |
1 similar comment
/run-check_dev_2 |
/merge |
@zhouqiang-cl: In response to this:
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 ti-community-infra/tichi repository. |
/merge |
@zhouqiang-cl: In response to this:
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 ti-community-infra/tichi repository. |
/run-check_dev_2 |
/run-unit-test |
/run-check_dev_2 |
4 similar comments
/run-check_dev_2 |
/run-check_dev_2 |
/run-check_dev_2 |
/run-check_dev_2 |
/run-check_dev_2 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.2 in PR #27461 |
Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com
What problem does this PR solve?
Issue Number: close #27296, close #27361
Problem Summary:
These functions' flen are wrong.
What is changed and how it works?
For exportSet(), set it flen to 508(the same as MySQL)
For concatWS(), consider the flen of the first argument, make it the same as concat().
For fromBase64(), calculate it flen.
Check List
Tests
Side effects
Documentation
Release note