mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-06 12:27:56 +00:00
PT-2083 - Pt-archiver --charset option is not working for MySQL8.0
- Run util/update-modules
This commit is contained in:
@@ -2100,11 +2100,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);
|
||||
|
Reference in New Issue
Block a user