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

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

Closed
mayjiang0203 opened this issue Jul 19, 2024 · 3 comments · Fixed by #11410
Assignees
Labels
affects-6.5 affects-7.1 affects-7.5 affects-8.1 area/dm Issues or PRs related to DM. report/community The community has encountered this bug. severity/major type/bug The issue is confirmed as a bug.

Comments

@mayjiang0203
Copy link

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)
@mayjiang0203 mayjiang0203 added area/dm Issues or PRs related to DM. type/bug The issue is confirmed as a bug. labels Jul 19, 2024
@mayjiang0203
Copy link
Author

/assign @lance6716
/severity major

@mayjiang0203
Copy link
Author

/label affects-8.1
/remove-label may-affects-8.1

@seiya-annie
Copy link

/report community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 affects-8.1 area/dm Issues or PRs related to DM. report/community The community has encountered this bug. severity/major type/bug The issue is confirmed as a bug.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants