mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-02-27 02:00:57 +08:00
PT-2401 - pt-online-schema-change 'table does not exist' on macos
- Modified code, so it still checks table name but based on the lower_case_table_names option
This commit is contained in:
@@ -2114,12 +2114,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -2135,7 +2129,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -504,12 +504,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -525,7 +519,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
10
bin/pt-find
10
bin/pt-find
@@ -2061,12 +2061,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -2082,7 +2076,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3935,12 +3935,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -3956,7 +3950,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3313,12 +3313,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -3334,7 +3328,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
10
bin/pt-kill
10
bin/pt-kill
@@ -3184,12 +3184,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -3205,7 +3199,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3503,12 +3503,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -3524,7 +3518,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9064,12 +9064,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -9085,7 +9079,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4697,12 +4697,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -4718,7 +4712,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3041,12 +3041,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -3062,7 +3056,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -7051,12 +7051,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -7072,7 +7066,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -341,12 +341,6 @@ sub check_table {
|
||||
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);
|
||||
|
||||
@@ -362,7 +356,9 @@ sub check_table {
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] ) {
|
||||
if ( !$row->[0]
|
||||
|| ( $lower_case_table_names == 0 && $row->[0] ne $tbl )
|
||||
|| ( $lower_case_table_names > 0 && lc $row->[0] ne lc $tbl ) ) {
|
||||
PTDEBUG && _d('Table does not exist');
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user