I'm trying to use the
pt-table-sync command
(Ubuntu latest ...) to synchronize all tables in two databases in the following way:
Code:
pt-table-sync --verbose --databases medics --execute h=10.11.22.77,u=root,p=secret h=127.0.0.1,u=root,p=secret
... and it cooks away for a while and produces promising-looking output like this:
Code:
# DELETE REPLACE INSERT UPDATE ALGORITHM START END EXIT DATABASE.TABLE
# 25 0 3380 437 Nibble 14:50:49 15:09:05 2 medics.address_book
# 8590 0 9015 0 Chunk 15:09:11 15:19:07 2 medics.aggregate_info
... but I first noticed that it seemed to produce
the same output each time I ran it, as though it were simply re-discovering the same differences again.
Suspicious, now, I found that this is apparently so: the number of rows in
(say ...) the
address_book table between the two databases was not equal. It looks like "3380 rows
should have been inserted," but that they
weren't!
When I then ran it against just one table with the
D=,t= options, once again the output of the command was the same as before, and the resulting number of rows in the table was not identical: 73,858 in the source; 73,699 in the target. (Also notice that the difference in row-count is only a few hundred ... not "3380.")
Several hours spent running this utility ... seemed to have not done anything at all.
I thought that someone said that this tool, y'know, "sync'd two MySQL databases!" It doesn't appear to do so. At least, not for me!
Why?