Bug 反馈
dmv8.1.0版本同步list分区表的删除分区的ddl语句时报错,但下游能够正常执行
【 TiDB 版本】
8.1.0
【 Bug 的影响】
【可能的问题复现步骤】
首先部署mysql到tidb的dm同步
下游设置 SET GLOBAL tidb_enable_list_partition = ON;
然后上游执行
CREATE TABLE employees11 (
id INT NOT NULL,
hired DATE NOT NULL DEFAULT ‘1970-01-01’,
store_id INT,
PRIMARY KEY (id
,store_id)
)
PARTITION BY LIST (store_id) (
PARTITION pNorth VALUES IN (1, 2, 3, 4, 5),
PARTITION pEast VALUES IN (6, 7, 8, 9, 10),
PARTITION pWest VALUES IN (11, 12, 13, 14, 15),
PARTITION pCentral VALUES IN (16, 17, 18, 19, 20)
) ;
ALTER TABLE employees11 DROP PARTITION pEast;
【看到的非预期行为】
下游查看表结构
SHOW CREATE TABLE employees11;
CREATE TABLE employees11
(
id
INT(11) NOT NULL,
hired
DATE NOT NULL DEFAULT ‘1970-01-01’,
store_id
INT(11) NOT NULL,
PRIMARY KEY (id
,store_id
) /*T![clustered_index] NONCLUSTERED */
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY LIST (store_id
)
(PARTITION pNorth
VALUES IN (1,2,3,4,5),
PARTITION pEast
VALUES IN (6,7,8,9,10),
PARTITION pWest
VALUES IN (11,12,13,14,15),
PARTITION pCentral
VALUES IN (16,17,18,19,20))
dm查看task状态
“Message”: “startLocation: [position: (mysql-bin.000001, 56898730), gtid-set: 00000000-0000-0000-0000-000000000000:0], endLocation: [position: (mysql-bin.000001, 56898854), gtid-set: 00000000-0000-0000-0000-000000000000:0], origin SQL: [ALTER TABLE employees11 DROP PARTITION pEast]: cannot track DDL: ALTER TABLE testdm8
.employees11
DROP PARTITION pEast
”
【期望看到的行为】
下游正常同步执行删除分区操作
SHOW CREATE TABLE employees11;
CREATE TABLE employees11
(
id
INT(11) NOT NULL,
hired
DATE NOT NULL DEFAULT ‘1970-01-01’,
store_id
INT(11) NOT NULL,
PRIMARY KEY (id
,store_id
) /*T![clustered_index] NONCLUSTERED */
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY LIST (store_id
)
(PARTITION pNorth
VALUES IN (1,2,3,4,5),
PARTITION pWest
VALUES IN (11,12,13,14,15),
PARTITION pCentral
VALUES IN (16,17,18,19,20))
【相关组件及具体版本】
dm v8.1.0
【其他背景信息或者截图】
无