diff options
author | jimw@mysql.com <> | 2005-03-03 15:01:46 -0800 |
---|---|---|
committer | jimw@mysql.com <> | 2005-03-03 15:01:46 -0800 |
commit | f7c01cfb76fa4284973a34ee03a9c2f71359dae0 (patch) | |
tree | d9fcf7c0806dd22a5d3dc0996b6c7b4ff240cbb9 /scripts | |
parent | 18f13a24a2890e610e868ebfc7e04397b78d6e85 (diff) | |
parent | 96e034f50e49068dd2391ef12f94cb40dcee7b1b (diff) | |
download | mariadb-git-f7c01cfb76fa4284973a34ee03a9c2f71359dae0.tar.gz |
Merged from 4.1
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqlhotcopy.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index 2cfe91da115..632174dc41a 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -272,10 +272,7 @@ foreach my $rdb ( @db_desc ) { my $negated; if ($rdb->{t_regex}) { $t_regex = $rdb->{t_regex}; ## assign temporary regex - $negated = $t_regex =~ tr/~//d; ## remove and count - ## negation operator: we - ## don't allow ~ in table - ## names + $negated = $t_regex =~ s/^~//; ## note and remove negation operator $t_regex = qr/$t_regex/; ## make regex string from ## user regex @@ -820,6 +817,16 @@ sub get_list_of_tables { }); my @dbh_tables = eval { $dbh->tables() }; + + ## Remove quotes around table names + my $quote = $dbh->get_info(29); # SQL_IDENTIFIER_QUOTE_CHAR + if ($quote) { + foreach (@dbh_tables) { + s/^$quote(.*)$quote$/$1/; + s/$quote$quote/$quote/g; + } + } + $dbh->disconnect(); return @dbh_tables; } |