Files
percona-toolkit/t/pt-archiver/samples/issue_1593265.sql
Carlos Salguero 01daf0030e bug-1593265 Fixed pt-archiver deletes wrong rows
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.
2016-06-22 13:17:57 -03:00

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);