mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-11 02:04:38 +08:00
Fixed a bug in Quoter->split_unquote, added several tests for find_renamed_cols
This commit is contained in:
@@ -93,12 +93,18 @@ sub quote_val {
|
||||
# <join_quote>
|
||||
sub split_unquote {
|
||||
my ( $self, $db_tbl, $default_db ) = @_;
|
||||
$db_tbl =~ s/`//g;
|
||||
my ( $db, $tbl ) = split(/[.]/, $db_tbl);
|
||||
if ( !$tbl ) {
|
||||
$tbl = $db;
|
||||
$db = $default_db;
|
||||
}
|
||||
for ($db, $tbl) {
|
||||
next unless $_;
|
||||
s/\A`//;
|
||||
s/`\z//;
|
||||
s/``/`/;
|
||||
}
|
||||
|
||||
return ($db, $tbl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user