diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-09-06 14:50:53 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-09-06 14:50:53 -0400 |
commit | bc09de6f6e009d7e812273b1e8e6c06c5397989c (patch) | |
tree | 901d4b37a285155d44fe26c741a4424175d556b4 /scripts | |
parent | dcb665900136fb4015589680c612add8abf1deca (diff) | |
parent | f60c6b1ea3d32ad090435aae98d049a121b24b73 (diff) | |
download | mariadb-git-bc09de6f6e009d7e812273b1e8e6c06c5397989c.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.0-maint
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqlhotcopy.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index f9e29e33195..b3ea9dc4035 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -262,6 +262,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}; @@ -296,7 +297,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 { @@ -604,7 +605,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); @@ -797,7 +798,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; } } |