From db0e8c8a16aa2c3a569fde607385457d397be88b Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Thu, 14 Dec 2023 10:22:05 +0300 Subject: [PATCH] Updated modules and version --- Makefile.PL | 2 +- bin/pt-align | 2 +- bin/pt-archiver | 6 +++--- bin/pt-config-diff | 4 ++-- bin/pt-deadlock-logger | 4 ++-- bin/pt-diskstats | 4 ++-- bin/pt-duplicate-key-checker | 26 ++++++++++++++++++++++---- bin/pt-fifo-split | 2 +- bin/pt-find | 26 ++++++++++++++++++++++---- bin/pt-fingerprint | 2 +- bin/pt-fk-error-logger | 4 ++-- bin/pt-heartbeat | 28 +++++++++++++++++++++++----- bin/pt-index-usage | 26 ++++++++++++++++++++++---- bin/pt-ioprofile | 2 +- bin/pt-kill | 28 +++++++++++++++++++++++----- bin/pt-mext | 2 +- bin/pt-mysql-summary | 2 +- bin/pt-online-schema-change | 4 ++-- bin/pt-pmp | 2 +- bin/pt-query-digest | 28 +++++++++++++++++++++++----- bin/pt-show-grants | 2 +- bin/pt-sift | 2 +- bin/pt-slave-delay | 4 ++-- bin/pt-slave-find | 4 ++-- bin/pt-slave-restart | 6 +++--- bin/pt-stalk | 2 +- bin/pt-summary | 2 +- bin/pt-table-checksum | 28 +++++++++++++++++++++++----- bin/pt-table-sync | 28 +++++++++++++++++++++++----- bin/pt-table-usage | 2 +- bin/pt-upgrade | 4 ++-- bin/pt-variable-advisor | 4 ++-- bin/pt-visual-explain | 2 +- config/sphinx-build/conf.py | 2 +- docs/percona-toolkit.pod | 2 +- lib/Percona/Toolkit.pm | 2 +- 36 files changed, 222 insertions(+), 78 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 0e8e8280..4879ad6f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,7 +11,7 @@ MAKE_GOTOOLS WriteMakefile( NAME => 'Percona::Toolkit', - VERSION => '3.5.5', + VERSION => '3.5.6', EXE_FILES => [ map { (my $name = $_) =~ s/^bin.//; diff --git a/bin/pt-align b/bin/pt-align index 32ae6d8e..ceb5c5c6 100755 --- a/bin/pt-align +++ b/bin/pt-align @@ -1364,6 +1364,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-align 3.5.5 +pt-align 3.5.6 =cut diff --git a/bin/pt-archiver b/bin/pt-archiver index 3f304d3d..58e1d4d9 100755 --- a/bin/pt-archiver +++ b/bin/pt-archiver @@ -45,7 +45,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -3819,7 +3819,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -8858,6 +8858,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-archiver 3.5.5 +pt-archiver 3.5.6 =cut diff --git a/bin/pt-config-diff b/bin/pt-config-diff index 7728032b..6c775d00 100755 --- a/bin/pt-config-diff +++ b/bin/pt-config-diff @@ -43,7 +43,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -6011,6 +6011,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-config-diff 3.5.5 +pt-config-diff 3.5.6 =cut diff --git a/bin/pt-deadlock-logger b/bin/pt-deadlock-logger index f889f5e9..245c94a2 100755 --- a/bin/pt-deadlock-logger +++ b/bin/pt-deadlock-logger @@ -42,7 +42,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -5788,6 +5788,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-deadlock-logger 3.5.5 +pt-deadlock-logger 3.5.6 =cut diff --git a/bin/pt-diskstats b/bin/pt-diskstats index 314c1830..7394d7f8 100755 --- a/bin/pt-diskstats +++ b/bin/pt-diskstats @@ -38,7 +38,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -5692,6 +5692,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-diskstats 3.5.5 +pt-diskstats 3.5.6 =cut diff --git a/bin/pt-duplicate-key-checker b/bin/pt-duplicate-key-checker index ff8244bf..fcdf1a07 100755 --- a/bin/pt-duplicate-key-checker +++ b/bin/pt-duplicate-key-checker @@ -39,7 +39,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -487,11 +487,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -5788,6 +5806,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-duplicate-key-checker 3.5.5 +pt-duplicate-key-checker 3.5.6 =cut diff --git a/bin/pt-fifo-split b/bin/pt-fifo-split index 73679abb..76481e52 100755 --- a/bin/pt-fifo-split +++ b/bin/pt-fifo-split @@ -1708,6 +1708,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-fifo-split 3.5.5 +pt-fifo-split 3.5.6 =cut diff --git a/bin/pt-find b/bin/pt-find index 77528b18..bbd2b7bd 100755 --- a/bin/pt-find +++ b/bin/pt-find @@ -35,7 +35,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -2039,11 +2039,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -5203,6 +5221,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-find 3.5.5 +pt-find 3.5.6 =cut diff --git a/bin/pt-fingerprint b/bin/pt-fingerprint index c9d9c4c8..47cb991e 100755 --- a/bin/pt-fingerprint +++ b/bin/pt-fingerprint @@ -2271,6 +2271,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-fingerprint 3.5.5 +pt-fingerprint 3.5.6 =cut diff --git a/bin/pt-fk-error-logger b/bin/pt-fk-error-logger index 5ad23d97..e44b6b3e 100755 --- a/bin/pt-fk-error-logger +++ b/bin/pt-fk-error-logger @@ -37,7 +37,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -4775,6 +4775,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-fk-error-logger 3.5.5 +pt-fk-error-logger 3.5.6 =cut diff --git a/bin/pt-heartbeat b/bin/pt-heartbeat index 723e2bc8..ed1b526c 100755 --- a/bin/pt-heartbeat +++ b/bin/pt-heartbeat @@ -44,7 +44,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -296,7 +296,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -3823,11 +3823,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -7518,6 +7536,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-heartbeat 3.5.5 +pt-heartbeat 3.5.6 =cut diff --git a/bin/pt-index-usage b/bin/pt-index-usage index 4f455c02..d35fb078 100755 --- a/bin/pt-index-usage +++ b/bin/pt-index-usage @@ -45,7 +45,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -3291,11 +3291,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -7733,6 +7751,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-index-usage 3.5.5 +pt-index-usage 3.5.6 =cut diff --git a/bin/pt-ioprofile b/bin/pt-ioprofile index f53c3f82..f7052f3b 100755 --- a/bin/pt-ioprofile +++ b/bin/pt-ioprofile @@ -1143,7 +1143,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-ioprofile 3.5.5 +pt-ioprofile 3.5.6 =cut diff --git a/bin/pt-kill b/bin/pt-kill index a13ac5c8..40cb35ee 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -47,7 +47,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -3154,11 +3154,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -4078,7 +4096,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -8804,6 +8822,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-kill 3.5.5 +pt-kill 3.5.6 =cut diff --git a/bin/pt-mext b/bin/pt-mext index 9e1562d6..1e48cefa 100755 --- a/bin/pt-mext +++ b/bin/pt-mext @@ -819,7 +819,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-mext 3.5.5 +pt-mext 3.5.6 =cut diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index b3fc0a2f..f89789d4 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -3378,7 +3378,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-mysql-summary 3.5.5 +pt-mysql-summary 3.5.6 =cut diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 3f303872..6ab6b32b 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -56,7 +56,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -13603,6 +13603,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-online-schema-change 3.5.5 +pt-online-schema-change 3.5.6 =cut diff --git a/bin/pt-pmp b/bin/pt-pmp index 9e27ae56..41345756 100755 --- a/bin/pt-pmp +++ b/bin/pt-pmp @@ -913,7 +913,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-pmp 3.5.5 +pt-pmp 3.5.6 =cut diff --git a/bin/pt-query-digest b/bin/pt-query-digest index 5d9480df..436c2439 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -64,7 +64,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -9042,11 +9042,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -10672,7 +10690,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -17041,6 +17059,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-query-digest 3.5.5 +pt-query-digest 3.5.6 =cut diff --git a/bin/pt-show-grants b/bin/pt-show-grants index 15f487cd..3c9e08bb 100755 --- a/bin/pt-show-grants +++ b/bin/pt-show-grants @@ -2673,6 +2673,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-show-grants 3.5.5 +pt-show-grants 3.5.6 =cut diff --git a/bin/pt-sift b/bin/pt-sift index e22a5506..f6cee781 100755 --- a/bin/pt-sift +++ b/bin/pt-sift @@ -1260,7 +1260,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-sift 3.5.5 +pt-sift 3.5.6 =cut diff --git a/bin/pt-slave-delay b/bin/pt-slave-delay index 2f05b798..4af78ea8 100755 --- a/bin/pt-slave-delay +++ b/bin/pt-slave-delay @@ -40,7 +40,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -5061,6 +5061,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-slave-delay 3.5.5 +pt-slave-delay 3.5.6 =cut diff --git a/bin/pt-slave-find b/bin/pt-slave-find index ef32c774..ea030675 100755 --- a/bin/pt-slave-find +++ b/bin/pt-slave-find @@ -2432,7 +2432,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -4638,6 +4638,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-slave-find 3.5.5 +pt-slave-find 3.5.6 =cut diff --git a/bin/pt-slave-restart b/bin/pt-slave-restart index 0ce2fad5..9b64e591 100755 --- a/bin/pt-slave-restart +++ b/bin/pt-slave-restart @@ -41,7 +41,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -2843,7 +2843,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -6289,6 +6289,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-slave-restart 3.5.5 +pt-slave-restart 3.5.6 =cut diff --git a/bin/pt-stalk b/bin/pt-stalk index 559046a2..c0ac76c0 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -2575,7 +2575,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-stalk 3.5.5 +pt-stalk 3.5.6 =cut diff --git a/bin/pt-summary b/bin/pt-summary index 288a389f..5ff9d954 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -2780,7 +2780,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-summary 3.5.5 +pt-summary 3.5.6 =cut diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index b06337e4..be143c13 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -58,7 +58,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -4670,11 +4670,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -5327,7 +5345,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -14203,6 +14221,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-table-checksum 3.5.5 +pt-table-checksum 3.5.6 =cut diff --git a/bin/pt-table-sync b/bin/pt-table-sync index 0e2cc3f6..1d9e2b81 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -55,7 +55,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -3019,11 +3019,29 @@ sub check_table { } my ($dbh, $db, $tbl) = @args{@required_args}; my $q = $self->{Quoter} || 'Quoter'; + $self->{check_table_error} = undef; + + + my $lctn_sql = 'SELECT @@lower_case_table_names'; + PTDEBUG && _d($lctn_sql); + + my $lower_case_table_names; + eval { ($lower_case_table_names) = $dbh->selectrow_array($lctn_sql); }; + if ( $EVAL_ERROR ) { + PTDEBUG && _d($EVAL_ERROR); + $self->{check_table_error} = $EVAL_ERROR; + return 0; + } + + PTDEBUG && _d("lower_case_table_names=$lower_case_table_names"); + if ($lower_case_table_names > 0) { + PTDEBUG && _d("MySQL uses case-insensitive lookup, converting '$tbl' to lowercase"); + $tbl = lc $tbl; + } + my $db_tbl = $q->quote($db, $tbl); PTDEBUG && _d('Checking', $db_tbl); - $self->{check_table_error} = undef; - my $sql = "SHOW TABLES FROM " . $q->quote($db) . ' LIKE ' . $q->literal_like($tbl); PTDEBUG && _d($sql); @@ -6843,7 +6861,7 @@ sub recurse_to_slaves { die $EVAL_ERROR; } } - } until ($id); + } until (defined $id); PTDEBUG && _d('Working on server ID', $id); my $master_thinks_i_am = $dsn->{server_id}; if ( !defined $id @@ -13223,6 +13241,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-table-sync 3.5.5 +pt-table-sync 3.5.6 =cut diff --git a/bin/pt-table-usage b/bin/pt-table-usage index 17d205dd..9f3f0bf4 100755 --- a/bin/pt-table-usage +++ b/bin/pt-table-usage @@ -8517,6 +8517,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-table-usage 3.5.5 +pt-table-usage 3.5.6 =cut diff --git a/bin/pt-upgrade b/bin/pt-upgrade index 42ceb8a0..849e4353 100755 --- a/bin/pt-upgrade +++ b/bin/pt-upgrade @@ -61,7 +61,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -11528,6 +11528,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-upgrade 3.5.5 +pt-upgrade 3.5.6 =cut diff --git a/bin/pt-variable-advisor b/bin/pt-variable-advisor index 8e522fd1..9c4f18e1 100755 --- a/bin/pt-variable-advisor +++ b/bin/pt-variable-advisor @@ -44,7 +44,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all'; @@ -6326,6 +6326,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-variable-advisor 3.5.5 +pt-variable-advisor 3.5.6 =cut diff --git a/bin/pt-visual-explain b/bin/pt-visual-explain index f2091e77..80f66138 100755 --- a/bin/pt-visual-explain +++ b/bin/pt-visual-explain @@ -3315,6 +3315,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-visual-explain 3.5.5 +pt-visual-explain 3.5.6 =cut diff --git a/config/sphinx-build/conf.py b/config/sphinx-build/conf.py index b56448fa..b445ec79 100644 --- a/config/sphinx-build/conf.py +++ b/config/sphinx-build/conf.py @@ -50,7 +50,7 @@ copyright = u'2023, Percona LLC and/or its affiliates' # The short X.Y version. version = '3.5' # The full version, including alpha/beta/rc tags. -release = '3.5.5' +release = '3.5.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/percona-toolkit.pod b/docs/percona-toolkit.pod index b2985a8a..c54054fe 100644 --- a/docs/percona-toolkit.pod +++ b/docs/percona-toolkit.pod @@ -575,6 +575,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -Percona Toolkit v3.5.5 released 2023-10-02 +Percona Toolkit v3.5.6 released 2023-12-18 =cut diff --git a/lib/Percona/Toolkit.pm b/lib/Percona/Toolkit.pm index d998009f..d5010d7c 100644 --- a/lib/Percona/Toolkit.pm +++ b/lib/Percona/Toolkit.pm @@ -18,7 +18,7 @@ # ########################################################################### package Percona::Toolkit; -our $VERSION = '3.5.5'; +our $VERSION = '3.5.6'; use strict; use warnings FATAL => 'all';