PT-1518 pt-table-checksum gives error CRC32 (#415)

This commit is contained in:
ovidiustanila
2020-07-24 05:40:53 +03:00
committed by GitHub
parent 8b5e885173
commit 8d59ef2051
4 changed files with 16 additions and 4 deletions

View File

@@ -6190,7 +6190,10 @@ sub _get_crc_type {
$type = $sth->{mysql_type_name}->[0];
$length = $sth->{mysql_length}->[0];
PTDEBUG && _d($sql, $type, $length);
if ( $type eq 'bigint' && $length < 20 ) {
if ( $type eq 'integer' && $length < 11 ) {
$type = 'int';
}
elsif ( $type eq 'bigint' && $length < 20 ) {
$type = 'int';
}
};

View File

@@ -4747,7 +4747,10 @@ sub get_crc_type {
$type = $sth->{mysql_type_name}->[0];
$length = $sth->{mysql_length}->[0];
PTDEBUG && _d($sql, $type, $length);
if ( $type eq 'bigint' && $length < 20 ) {
if ( $type eq 'integer' && $length < 11 ) {
$type = 'int';
}
elsif ( $type eq 'bigint' && $length < 20 ) {
$type = 'int';
}
};