Merged fix-1034717-divison-by-zero-base-1

This commit is contained in:
Brian Fraser
2012-08-24 19:50:34 -03:00
4 changed files with 73 additions and 6 deletions

View File

@@ -3978,6 +3978,12 @@ sub _chunk_char {
}
PTDEBUG && _d("Base", $base, "chars:", @chars);
die "Cannot chunk table $db_tbl using the character column "
. "$chunk_col, most likely because all values start with the "
. "same character. This table must be synced separately by "
. "specifying a list of --algorithms without the Chunk algorithm"
if $base == 1;
$sql = "SELECT MAX(LENGTH($qchunk_col)) FROM $db_tbl "
. ($args{where} ? "WHERE $args{where} " : "")
@@ -11192,6 +11198,10 @@ primary key columns and a checksum are sent over the network, not the entire
row. If a row is found to be different, the entire row will be fetched, but not
before.
Note that this algorithm will not work if chunking a char column where all
the values start with the same character. In that case, the tool will exit
and suggest picking a different algorithm.
=item Nibble
Finds an index and ascends the index in fixed-size nibbles of L<"--chunk-size">