diff -ur mysql-4.0.18.orig/scripts/mysqlhotcopy.sh mysql-4.0.18/scripts/mysqlhotcopy.sh --- mysql-4.0.18.orig/scripts/mysqlhotcopy.sh 2004-02-10 19:16:08.000000000 +0100 +++ mysql-4.0.18/scripts/mysqlhotcopy.sh 2004-09-13 13:11:49.000000000 +0200 @@ -636,7 +636,8 @@ elsif ($opt{method} eq 'scp') { my $tmp=$tmpfile; - open(OUTPUT,">$tmp") || die "Can\'t create file $tmp: $!\n"; + use Fcntl; + sysopen(OUTPUT,$tmp,O_WRONLY|O_EXCL|O_CREAT) || die "Can\'t create file $tmp: $!\n"; if (syswrite(OUTPUT,$buff) != length($buff)) { die "Error when writing data to $tmp: $!\n";