mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-23 21:05:00 +00:00
Compare lc(index) everywhere.
This commit is contained in:
@@ -3778,7 +3778,7 @@ sub set_nibble_number {
|
||||
|
||||
sub nibble_index {
|
||||
my ($self) = @_;
|
||||
return $self->{index};
|
||||
return lc($self->{index});
|
||||
}
|
||||
|
||||
sub statements {
|
||||
@@ -6399,12 +6399,19 @@ sub main {
|
||||
sth => $sth->{explain_upper_boundary},
|
||||
vals => [ @{$boundary->{lower}}, $nibble_iter->chunk_size() ],
|
||||
);
|
||||
if ( ($expl->{key} || '') ne $nibble_iter->nibble_index() ) {
|
||||
if ( lc($expl->{key} || '') ne $nibble_iter->nibble_index() ) {
|
||||
PTDEBUG && _d('Cannot nibble next chunk, aborting table');
|
||||
if ( $o->get('quiet') < 2 ) {
|
||||
warn ts("Aborting $tbl->{db}.$tbl->{tbl} because "
|
||||
my $msg
|
||||
= "Aborting table $tbl->{db}.$tbl->{tbl} at chunk "
|
||||
. ($nibble_iter->nibble_number() + 1)
|
||||
. " cannot be nibbled safely.\n");
|
||||
. " because it is not safe to chunk. Chunking should "
|
||||
. "use the "
|
||||
. ($nibble_iter->nibble_index() || '?')
|
||||
. " index, but MySQL EXPLAIN reports that "
|
||||
. ($expl->{key} ? "the $expl->{key}" : "no")
|
||||
. " index will be used.\n";
|
||||
warn ts($msg);
|
||||
}
|
||||
$tbl->{checksum_results}->{errors}++;
|
||||
return 0; # stop nibbling table
|
||||
@@ -6460,7 +6467,7 @@ sub main {
|
||||
: 0;
|
||||
|
||||
# Ensure that MySQL is using the chunk index.
|
||||
if ( ($expl->{key} || '') ne $nibble_iter->nibble_index() ) {
|
||||
if ( lc($expl->{key} || '') ne $nibble_iter->nibble_index() ) {
|
||||
PTDEBUG && _d('Chunk', $args{nibbleno}, 'of table',
|
||||
"$tbl->{db}.$tbl->{tbl} not using chunk index, skipping");
|
||||
return 0; # next boundary
|
||||
@@ -7260,15 +7267,13 @@ sub have_more_chunks {
|
||||
# The previous chunk index must match the current chunk index,
|
||||
# else we don't know what to do.
|
||||
my $chunk_index = $nibble_iter->nibble_index() || '';
|
||||
if ( ($last_chunk->{chunk_index} || '')
|
||||
ne ($nibble_iter->nibble_index() || '') ) {
|
||||
if (lc($last_chunk->{chunk_index} || '') ne $chunk_index) {
|
||||
warn ts("Cannot resume from table $tbl->{db}.$tbl->{tbl} chunk "
|
||||
. "$last_chunk->{chunk} because the chunk indexes are different: "
|
||||
. ($last_chunk->{chunk_index} ? $last_chunk->{chunk_index}
|
||||
: "no index")
|
||||
. " was used originally but "
|
||||
. ($nibble_iter->nibble_index() ? $nibble_iter->nibble_index()
|
||||
: "no index")
|
||||
. ($chunk_index ? $chunk_index : "no index")
|
||||
. " is used now. If the table has not changed significantly, "
|
||||
. "this may be caused by running the tool with different command "
|
||||
. "line options. This table will be skipped and checksumming "
|
||||
|
Reference in New Issue
Block a user