When I use the Pt-table-sync command--print or--execute, the following error is reported:
[root@pc ~]# pt-table-sync--replicate=ccda.checksums--tables=pending_0--charset=utf8 system@123 h=192.168.1.202 u=root,p=system@123--port 3307--print >/download/diff.log
Failed to prepare Tablesyncchunk plugin:cannot chunk table ' CCDA ' using the pending_0 column character, _id most Because all values start with the same character. This table must is synced separately by specifying a list of--algorithms without the Chunk algorithm -table-sync Line 4049. While doing ccda.pending_0 on 192.168.1.202
Moreover, I found that when the difference in the amount of hours, do not report the error. The error was reported when the difference was large.
Although the error, but with--execute found, actually also synchronized most of the data, will lose some of the data. For example, the table variance data I tested should be 450,000 records, but found that only 340,000 data were synchronized.
Pt-table-sync--help
View Algorithms
--algorithms=s algorithm to use when comparing the tables, in
Order of preference (default Chunk,nibble,groupby,
Stream)
--Solution:
With nibble algorithm synchronization (other algorithms I did not test, I do not know whether it is feasible).
Pt-table-sync--algorithms=nibble--replicate=ccda.checksums--tables=pending_0--charset=UTF8 h=127.0.0.1,u=root,p =system@123 h=192.168.1.202 u=root,p=system@123--port 3307--execute
-Note:--charset=utf8 is best to specify a capital UTF8, because I found that on some machines specified lowercase utf8, or will appear in Chinese garbled.