BUG: mysqlhotcopy.sh still needs this patch
am 05.10.2002 06:42:56 von Paul DuBoisSent this in a few weeks ago, problem is still present.
mysqlhotcopy sometimes attempts to create directories using
a pathname with a trailing slash. This fails on, for example,
Mac OS X. The following patch looks for extraneous trailing
slashes after the first character in the pathname and removes
them. (It looks after the first character in order to avoid
changing "/" to "".)
--- mysqlhotcopy.orig Fri Oct 4 23:31:29 2002
+++ mysqlhotcopy Fri Oct 4 23:34:42 2002
@@ -388,6 +388,7 @@
foreach my $td ( '', @{$rdb->{raid_dirs}} ) {
my $tgt_dirpath = "$rdb->{target}/$td";
+ substr ($tgt_dirpath, 1) =~ s|/+$||;
if ( $opt{dryrun} ) {
print "mkdir $tgt_dirpath, 0750\n";
}
How-to-repeat:
Issue either of these commands on Mac OS X:
% mysqlhotcopy test
or
% mysqlhotcopy test .
The first tries to create DATADIR/test_copy/ and fails.
The second tries to create ./test/ and fails.
The patch changes those paths to DATADIR/test_copy and ./test,
respectively.
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12639@lists.mysql.com
To unsubscribe, e-mail