mysql Alterar tabela para compactar dados falha com “entrada duplicada”

1

Eu estava tentando compactar algumas tabelas, mas uma delas causou esse erro

alter table MY_table row_format=compressed, algorithm=INPLACE, LOCK=NONE; Query OK, 0 rows affected (0.00 sec)
ERROR 1062 (23000): Duplicate entry '740003820' for key 'PRIMARY

Depois tentei mesmo com

alter table MY_table row_format=compressed;

Tem o mesmo erro 1062 Entrada duplicada.

De acordo com o DOC link

When running an online ALTER TABLE operation, the thread that runs the ALTER TABLE operation will apply an “online log” of DML operations that were run concurrently on the same table from other connection threads. When the DML operations are applied, it is possible to encounter a duplicate key entry error (ERROR 1062 (23000): Duplicate entry), even if the duplicate entry is only temporary and would be reverted by a later entry in the “online log”. This is similar to the idea of a foreign key constraint check in InnoDB in which constraints must hold during a transaction.

Quais são minhas opções?

    
por DBAd 14.04.2016 / 06:11

0 respostas