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

Set default DDL still work after rename table, which cause TiCDC fail #32610

Closed
maxshuang opened this issue Feb 24, 2022 · 0 comments · Fixed by #33354
Closed

Set default DDL still work after rename table, which cause TiCDC fail #32610

maxshuang opened this issue Feb 24, 2022 · 0 comments · Fixed by #33354
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@maxshuang
Copy link

maxshuang commented Feb 24, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Set up a TiDB cluster using Tiup
tiup  playground  v5.3.0 --tag 530.1   --db 1 --kv 3 --pd 1  --ticdc 1 
  1. Create database schrddl for test
  2. Using schrddl to test TiDB
go get github.com/PingCAP-QE/schrddl
GO111MODULE=on go build -o ./schrddl github.com/PingCAP-QE/schrddl
./schrddl --mode=parallel  --db="schrddl"  --time=30s  --concurrency=5 --output='schrddl.out'
  1. Check the ddl history
curl  http://127.0.0.1:10080/ddl/history >> ddl.job

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

ddl jobs run normal

3. What did you see instead (Required)

A strange DDL sequence

"query": "CREATE TABLE `e71e58cd-5e43-4138-9ebd-83280727eac1` (`321c2ad3-3f26-4e8c-90fd-adedf2fd1349` DECIMAL(19,7), `e12cbd81-31a9-4f74-9b07-c460eebbd04c` CHAR(107), PRIMARY KEY (`321c2ad3-3f26-4e8c-90fd-adedf2fd1349`, `e12cbd81-31a9-4f74-9b07-c460eebbd04c`)) COMMENT 'd3ce9d00-f1a7-41d0-a8b4-aa59d0883b59' CHARACTER SET 'utf8' COLLATE 'utf8_bin'",
 "query": "ALTER TABLE `e71e58cd-5e43-4138-9ebd-83280727eac1` RENAME AS `28bcfea3-0175-486e-b2f4-dbbade6fa6cf`",
"query": "ALTER TABLE `e71e58cd-5e43-4138-9ebd-83280727eac1` ALTER `e12cbd81-31a9-4f74-9b07-c460eebbd04c` SET DEFAULT 'xu3kigyzkibqhhtcf2tt1pi5il6b81getrxk4ovr6a686m68jouu6d01nah2htf7kcn5xz3h8zl'",

Set default DDL still work after rename table, but it will cause error in TiCDC because after renaming the table, the original table doesn't exists any more.

related log: 归档.zip

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.3.0
Edition: Community
Git Commit Hash: 4a1b2e9
Git Branch: heads/refs/tags/v5.3.0
UTC Build Time: 2021-11-24 13:31:18
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@maxshuang maxshuang added the type/bug The issue is confirmed as a bug. label Feb 24, 2022
@maxshuang maxshuang changed the title Set default DDL still work after rename table Set default DDL still work after rename table, which cause TiCDC fail Feb 24, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. labels Feb 24, 2022
@jebter jebter added the affects-5.3 This bug affects 5.3.x versions. label Feb 25, 2022
@ti-chi-bot ti-chi-bot removed the may-affects-5.3 This bug maybe affects 5.3.x versions. label Feb 25, 2022
@wjhuang2016 wjhuang2016 added affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.4 This bug affects 5.4.x versions. and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. labels Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants