If mk-table-checksum used with --replicate decides to chunk on a datetime
column, the resulting WHERE clauses for the chunk boundaries could look
like this:
(`date` >= "2008-09-11 23:00:52" AND `date` < "2008-09-14 16:46:05")
If these are stored into the boundaries column which is currently
recommended to be CHAR(64) according to the perldoc, it'll get truncated.
Now when mk-table-sync is run with --replicate it can get an error like
this during get_range_statistics():
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '"2008-09-14
16:46:0' at line 1 at line 2052 while doing foo.bar
mk-table-checksum needs to detect whether the value it's trying to put into
the boundaries column is too long.
mk-table-sync needs to treat the value from boundaries as untrusted input,
and show a more useful error here.
The perldoc needs a bigger column there.
Original issue reported on code.google.com by baron.schwartz on 30 Sep 2008 at 2:36
Original issue reported on code.google.com by
baron.schwartz
on 30 Sep 2008 at 2:36