Hi ,
I am having a problem where pt-archiver is not archiving the last row from my tables. It just leaves the last row behind.
And then when there is only one row in the table no archive takes place at all.
This happens on any table that i try to archive using where "1=1" technique from manual.
Am i doing something wrong?
How to reproduce below.
Thanks,
-Eric
pt-archiver --version
pt-archiver 2.0.3
CREATE TABLE `foo` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`modified_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1
INSERT INTO foo values (null,null),(null,null),(null,null),(null,null),(null,null),(null,null),(null,null),(null,null),(null,null),(null,null) ;
select count(*) from foo; # from source
+----------+
| count(*) |
+----------+
| 10 |
+----------+
/usr/bin/pt-archiver --source h=writer,D=test,t=foo,P=3306 --dest h=archive,D=test,t=foo,P=3307 --sentinel /tmp/pt-archiver-sentinel --replace --why-quit --where "1=1" --no-delete
select count(*) from foo; # from destination
+----------+
| count(*) |
+----------+
| 9 |
+----------+