Skip to content

DM: sync drop partition failed due to "[ddl:1505]Partition management on a not partitioned table is not possible" #11408

@mayjiang0203

Description

@mayjiang0203

What did you do?

From https://asktug.com/t/topic/1029420/2

Create one list partition then drop one partition in upstream.

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;

What did you expect to see?

No error report by dm.

What did you see instead?

DM reports the following errors.

[2024/07/17 16:13:27.422 +08:00] [ERROR] [subtask.go:359] [“unit process error”] [subtask=testdm8] [unit=Sync] [“error information”="ErrCode:44006 ErrClass:"schema-tracker" ErrScope:"internal" ErrLevel:
"high" 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" RawCause:"[ddl:1505]Partition management on
a not partitioned table is not possible" Workaround:"You can use handle-error to replace or skip this DDL." "]

Versions of the cluster

DM version (run dmctl -V or dm-worker -V or dm-master -V):
v8.1 and nightly.

(paste DM version here, and you must ensure versions of dmctl, DM-worker and DM-master are same)

Upstream MySQL/MariaDB server version:

(paste upstream MySQL/MariaDB server version here)

Downstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

How did you deploy DM: tiup or manually?

(leave TiUP or manually here)

Other interesting information (system version, hardware config, etc):

>
>

current status of DM cluster (execute query-status <task-name> in dmctl)

(paste current status of DM cluster here)

Metadata

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.area/dmIssues or PRs related to DM.report/communityThe community has encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions