diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-10-02 16:18:42 -0600 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-10-02 16:18:42 -0600 |
commit | 1b665fa7ce93dd681844c050733f14af73ece174 (patch) | |
tree | e7f1dc3fe564be4346222f7aac1c35e218cd1f53 /scripts | |
parent | ce1a7d997584096aef547a0bbd7193d64db56137 (diff) | |
parent | 2f7849dfd5884d2d6f7097f5c0e4431a3b5a3e30 (diff) | |
download | mariadb-git-1b665fa7ce93dd681844c050733f14af73ece174.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/40
into siva.hindu.god:/usr/home/tim/m/bk/41
scripts/mysqlhotcopy.sh:
Auto merged
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 1c5cd6a4faf..cd615cf7fc3 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}; @@ -293,7 +294,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 { @@ -601,7 +602,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); @@ -809,7 +810,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; } } |