mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00

In the case we are trying to migrate a table with no PK nor an unique key, pt-archiver was failing to select the correct rows for deletion. This fix implemented here is to add ALL columns in the WHERE clause of the DELETE command. This way, we are deleting only the exact same row we just migrated but using columns instead of an index.
14 lines
351 B
SQL
14 lines
351 B
SQL
CREATE DATABASE IF NOT EXISTS test;
|
|
USE test;
|
|
DROP TABLE IF EXISTS t1;
|
|
DROP TABLE IF EXISTS t2;
|
|
|
|
create table t1 (a int, b int, key (a),key(b));
|
|
create table t2 like t1;
|
|
|
|
insert into t1 (a,b) values (10,5);
|
|
insert into t1 (a,b) values (10,4);
|
|
insert into t1 (a,b) values (10,3);
|
|
insert into t1 (a,b) values (10,2);
|
|
insert into t1 (a,b) values (10,1);
|