BUG: mysqlhotcopy.sh still needs this patch

BUG: mysqlhotcopy.sh still needs this patch

am 05.10.2002 06:42:56 von Paul DuBois

Sent 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

BUG: mysqlhotcopy.sh still needs this patch

am 07.10.2002 19:00:29 von Michael Widenius

Hi!

>>>>> "Paul" == Paul DuBois writes:

Paul> Sent this in a few weeks ago, problem is still present.
Paul> mysqlhotcopy sometimes attempts to create directories using
Paul> a pathname with a trailing slash. This fails on, for example,
Paul> Mac OS X. The following patch looks for extraneous trailing
Paul> slashes after the first character in the pathname and removes
Paul> them. (It looks after the first character in order to avoid
Paul> changing "/" to "".)

Paul> --- mysqlhotcopy.orig Fri Oct 4 23:31:29 2002
Paul> +++ mysqlhotcopy Fri Oct 4 23:34:42 2002



Thanks; I have now added this to my 3.23 source tree
(Will push this soon and propagate this to 4.0 and 4.1 before next
release)

Regards,
Monty

------------------------------------------------------------ ---------
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-thread12655@lists.mysql.com
To unsubscribe, e-mail