summaryrefslogtreecommitdiff
path: root/scripts/mysqlhotcopy.sh
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-10-03 09:05:34 +0200
committerunknown <msvensson@shellback.(none)>2006-10-03 09:05:34 +0200
commitb274c522ec84c84c76901ecafb6a59fb2a6716e7 (patch)
treed6550e14d6c184ce1d12edfbeb585147281e562e /scripts/mysqlhotcopy.sh
parent2f0405283fae4a3b416df7e5936257be8f36529f (diff)
parent387aa13c950284e9662a40e9bba6605bb36bb9a3 (diff)
downloadmariadb-git-b274c522ec84c84c76901ecafb6a59fb2a6716e7.tar.gz
Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint scripts/mysqlhotcopy.sh: Auto merged
Diffstat (limited to 'scripts/mysqlhotcopy.sh')
-rw-r--r--scripts/mysqlhotcopy.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index bf53aa78e15..61cd59457d1 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -263,6 +263,7 @@ my $hc_locks = "";
my $hc_tables = "";
my $num_tables = 0;
my $num_files = 0;
+my $raid_dir_regex = '[A-Za-z0-9]{2}';
foreach my $rdb ( @db_desc ) {
my $db = $rdb->{src};
@@ -294,7 +295,7 @@ foreach my $rdb ( @db_desc ) {
my @raid_dir = ();
while ( defined( my $name = readdir DBDIR ) ) {
- if ( $name =~ /^\d\d$/ && -d "$db_dir/$name" ) {
+ if ( $name =~ /^$raid_dir_regex$/ && -d "$db_dir/$name" ) {
push @raid_dir, $name;
}
else {
@@ -602,7 +603,7 @@ sub copy_files {
# add recursive option for scp
$cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/;
- my @non_raid = map { "'$_'" } grep { ! m:/\d{2}/[^/]+$: } @$files;
+ my @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files;
# add files to copy and the destination directory
safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid);
@@ -810,7 +811,7 @@ sub get_raid_dirs {
my %dirs = ();
foreach my $f ( @$r_files ) {
- if ( $f =~ m:^(\d\d)/: ) {
+ if ( $f =~ m:^($raid_dir_regex)/: ) {
$dirs{$1} = 1;
}
}