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

unexpected behaviour of dumpling's CollationCompatible #37241

Closed
lance6716 opened this issue Aug 19, 2022 · 1 comment · Fixed by #37243
Closed

unexpected behaviour of dumpling's CollationCompatible #37241

lance6716 opened this issue Aug 19, 2022 · 1 comment · Fixed by #37243
Labels

Comments

@lance6716
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use "strict" CollationCompatible in DM

MySQL [sync_collation2]> show create table t2;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2    | CREATE TABLE `t2` (
  `id` int NOT NULL,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)
$ cat /tmp/dm_test/sync_collation/worker2/dumped_data.sync_collation/sync_collation2.t2-schema.sql 
/*!40101 SET NAMES binary*/;
CREATE TABLE `t2` (`id` INT NOT NULL,`name` VARCHAR(20) CHARACTER SET UTF8MB4 COLLATE utf8mb4_0900_ai_ci COLLATE utf8mb4_general_ci DEFAULT NULL,PRIMARY KEY(`id`)) ENGINE = InnoDB DEFAULT CHARACTER SET = LATIN1 DEFAULT COLLATE = LATIN1_BIN;

note there's two COLLATE

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@lance6716 lance6716 added the type/bug This issue is a bug. label Aug 19, 2022
@lance6716
Copy link
Contributor Author

/cc @WizardXiao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant