Error 8200 (HY000): Unsupported drop primary key when the table is using clustered index

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: "Error 8200 (HY000): Unsupported drop primary key when the table is using clustered index

| username: 潇湘秦1

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.5
[Reproduction Path] Operations performed that led to the issue
MySQL DM syncing to TiDB
[Encountered Issue: Problem Phenomenon and Impact]
Due to an issue with the MySQL primary database, a table’s primary key was deleted, but TiDB cannot delete the primary key
"Error 8200 (HY000): Unsupported drop primary key when the table is using clustered index
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page

| username: DBAER | Original post link

This operation is not supported.

| username: 潇湘秦1 | Original post link

I found this on the official website, but if it’s not supported, there’s no solution.

| username: TIDB-Learner | Original post link

Is the table large? Consider an alternative approach: rebuild the table, rebuild the index, and migrate the data over.

| username: zhaokede | Original post link

The only option is to rebuild the table and make it a non-clustered table.
Clustered indexes do not support deletion.

| username: TiDBer_QYr0vohO | Original post link

Rebuild the table and change it to a non-clustered table.

| username: xiaoqiao | Original post link

Delete and rebuild, import data.

| username: TiDBer_RjzUpGDL | Original post link

Rebuild the table and import the data.

| username: 像风一样的男子 | Original post link

Your screenshot still has a watermark, and your name is exposed.

| username: 洪七表哥 | Original post link

Rebuild table

| username: TiDBer_JUi6UvZm | Original post link

Use non-clustered tables.

| username: TiDBer_JUi6UvZm | Original post link

Rebuild the table first, then switch to a non-clustered table.

| username: paulli | Original post link

Clustered tables are not supported, switch to non-clustered tables.

| username: 呢莫不爱吃鱼 | Original post link

Not supported, you should create the table again.

| username: Jack-li | Original post link

Recreate the table