-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Closed
Copy link
Labels
severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
In mysql 8.0.26:
mysql> create database `gbk` character set gbk;
mysql> use `gbk`;
mysql> create table t (id int, name varchar(20), primary key(`id`)) character set gbk;
mysql> insert into t (id, name) values (0, '你好0');
In TiDB:
Terminal> tiup playground --pd 1 --db 1 --kv 3 --db.config ./tidb.toml
mysql> create database `gbk` character set gbk;
mysql> use `gbk`;
mysql> create table t (id int, name varchar(20), primary key(`id`)) character set gbk;
mysql> insert into t (id, name) values (0, '你好0');
content in tidb.toml:
new_collations_enabled_on_first_bootstrap = true
[experimental]
enable-new-charset = true
2. What did you expect to see? (Required)
In mysql:
select CRC32(`name`) FROM `gbk`.`t`;
+---------------+
| CRC32(`name`) |
+---------------+
| 280664119 |
+---------------+
1 row in set (0.00 sec)
In TiDB
select CRC32(`name`) FROM `gbk`.`t`;
+---------------+
| CRC32(`name`) |
+---------------+
| 4115664031 |
+---------------+
1 row in set (0.00 sec)
3. What did you see instead (Required)
the result need to be the same
4. What is your TiDB version? (Required)
Release Version: v5.3.0
Edition: Community
Git Commit Hash: 4a1b2e9fe5b5afb1068c56de47adb07098d768d6
Git Branch: heads/refs/tags/v5.3.0
UTC Build Time: 2021-11-24 13:32:39
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
severity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.