Skip to content
Snippets Groups Projects
Commit df694d7b authored by Andy Yates's avatar Andy Yates
Browse files

If we were doing patterns then obliterate the dbname param letting the code do the right thing

parent 2a513263
No related branches found
No related tags found
No related merge requests found
......@@ -119,16 +119,21 @@ $support->check_required_params;
my @databases;
# connect to database
my $dbh = $support->get_dbconnection('');
if($support->param('dbname') =~ /%/) {
my $dbh;
my $original_dbname = $support->param('dbname');
if($original_dbname =~ /%/) {
$support->param('dbname', q{});
$dbh = $support->get_dbconnection('');
my $ref = $dbh->selectall_arrayref('show databases like ?', {}, $support->param('dbname'));
push(@databases, map {$_->[0]} @{$ref})
}
else {
push(@databases, $support->param('dbname'));
$dbh = $support->get_dbconnection('');
push(@databases, $original_dbname);
}
# find all backup tables
my @tables;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment