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

Builtin func convert() can't deal with GBK charset correctly #29735

Closed
Defined2014 opened this issue Nov 12, 2021 · 2 comments · Fixed by #30004
Closed

Builtin func convert() can't deal with GBK charset correctly #29735

Defined2014 opened this issue Nov 12, 2021 · 2 comments · Fixed by #30004
Assignees
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Defined2014 commented Nov 12, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

start tidb-server with

./bin/tidb-server --config=cmd/explaintest/config.tom
drop table if exists t;
create table t(a binary(10));
insert into t values (0xe240), (0x01e240);
select convert(a using gbk) from t;

2. What did you expect to see? (Required)

mysql> select convert(a using gbk) from t;
+----------------------+
| convert(a using gbk) |
+----------------------+
| 釦                   |
| 釦                  |
+----------------------+
2 rows in set (0.00 sec)

3. What did you see instead (Required)

mysql> select convert(a using gbk) from t;
ERROR 1105 (HY000): encoding: rune not supported by encoding.

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                           |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.4.0-alpha-97-g5bece67a9
Edition: Community
Git Commit Hash: 5bece67a9bae979020186b9819b1d3e90cff6678
Git Branch: master
UTC Build Time: 2021-11-12 11:19:21
GoVersion: go1.16.6
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@Defined2014 Defined2014 added the type/bug The issue is confirmed as a bug. label Nov 12, 2021
@Defined2014
Copy link
Contributor Author

/assign

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
2 participants