-
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
expression: support GBK for builtin function Decode and Encode #29315
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. |
/wip |
8102e77
to
b6687f0
Compare
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
b6687f0
to
4be11b3
Compare
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
/run-check_dev_2 |
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
…add_gbk_for_decode
…add_gbk_for_decode
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
…add_gbk_for_decode
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
…add_gbk_for_decode
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
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
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
5c301ad
to
f5af85f
Compare
drop table if exists t; | ||
create table t (a char(20) charset utf8mb4, b char(20) charset gbk, c binary(20)); | ||
insert into t values ('一二三', '一二三', '一二三'); | ||
select decode(encode(a,"monty"),"monty") = a, md5(decode(encode(b,"monty"),"monty")) = md5(b), decode(encode(c,"monty"),"monty") = c from t; |
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.
I doubt it can test the encode and decode function with gbk charset. Suppose we do nothing with these two functions, they are still equal.
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.
The same here is fine, the reason why the above one needs md5 is that there is no way to do the = calculation here. Otherwise, an error will be reported.
(1267, "Illegal mix of collations (utf8_general_ci,COERCIBLE) and (gbk_chinese_ci,IMPLICIT) for operation '='")
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f5af85f
|
What problem does this PR solve?
Issue Number:
close #29314
close #29169
Problem Summary:
expression: support GBK for builtin function Decode and Encode
Check List
Tests
Release note