List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:July 26 2006 6:36pm
Subject:bk commit into 4.0 tree (iggy:1.2188) BUG#18777
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of iggy. When iggy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-07-26 12:36:10-04:00, iggy@stripped +1 -0
  Bug #18777: Mysqlhotcopy does not copy all the direcories.

  scripts/mysqlhotcopy.sh@stripped, 2006-07-26 12:36:09-04:00, iggy@stripped +4 -3
    Defined new raid directory regular expression variable that allows a mix of two alphanumeric characters.  Replaced hardcode raid directory regular expressions with new variable.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	iggy
# Host:	rolltop.ignatz42.dyndns.org
# Root:	/mnt/storeage/mysql-4.0-maint_bug18777

--- 1.46/scripts/mysqlhotcopy.sh	2006-07-26 12:36:12 -04:00
+++ 1.47/scripts/mysqlhotcopy.sh	2006-07-26 12:36:12 -04:00
@@ -262,6 +262,7 @@
 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 @@
     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 @@
 	# 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 @@
 
     my %dirs = ();
     foreach my $f ( @$r_files ) {
-	if ( $f =~ m:^(\d\d)/: ) {
+	if ( $f =~ m:^($raid_dir_regex)/: ) {
 	    $dirs{$1} = 1;
 	}
     }
Thread
bk commit into 4.0 tree (iggy:1.2188) BUG#18777Ignacio Galarza26 Jul