List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:March 12 2009 6:42pm
Subject:bzr commit into mysql-6.0 branch (ingo.struewing:2791) WL#4518
View as plain text  
#At file:///home2/mydev/bzrroot/mysql-6.0-wl4518-1/ based on revid:charles.bell@stripped

 2791 Ingo Struewing	2009-03-12
      WL#4518 - Online Backup: Test backupdir variable
      
      Beautified the existing test case.
      Added more tests.
      Added a new test case for symlinks and pipes, not for Windows.
     @ mysql-test/suite/backup/r/backup_backupdir.result
        WL#4518 - Online Backup: Test backupdir variable
        Updated test result.
     @ mysql-test/suite/backup/r/backup_backupdir_not_windows.result
        WL#4518 - Online Backup: Test backupdir variable
        New test result.
     @ mysql-test/suite/backup/t/backup_backupdir.test
        WL#4518 - Online Backup: Test backupdir variable
        Fixed some echoes.
        Beautified echoes.
        Moved cleanup for files to the tests where they are used.
        Made tests more symmetric. Added file_exists and RESTORE
        at some places.
        Added new tests.
     @ mysql-test/suite/backup/t/backup_backupdir_not_windows.test
        WL#4518 - Online Backup: Test backupdir variable
        New test case.

    added:
      mysql-test/suite/backup/r/backup_backupdir_not_windows.result
      mysql-test/suite/backup/t/backup_backupdir_not_windows.test
    modified:
      mysql-test/suite/backup/r/backup_backupdir.result
      mysql-test/suite/backup/t/backup_backupdir.test
=== modified file 'mysql-test/suite/backup/r/backup_backupdir.result'
--- a/mysql-test/suite/backup/r/backup_backupdir.result	2009-02-26 22:19:09 +0000
+++ b/mysql-test/suite/backup/r/backup_backupdir.result	2009-03-12 18:42:46 +0000
@@ -1,82 +1,212 @@
-Reset backupdir 
-SET @@global.backupdir = @@global.datadir;
+# Save backupdir 
+SET @old_backupdir= @@backupdir;
 DROP DATABASE IF EXISTS bup_backupdir;
-Create a database
+#
+# Create a database to be used throughout the test case
+#
 CREATE DATABASE bup_backupdir;
 CREATE TABLE bup_backupdir.t1(a INT);
 INSERT INTO bup_backupdir.t1 VALUES (1), (2), (3);
-Create a directory for backup images
-Reset backupdir 
+#
+# Create a backup directory to be used throughout the test case
+#
+#
+# The following tests the backupdir variable by changing it to redirect
+# the output of the backup command/input of the restore command.
+#
+# Set backupdir 
 SET @@global.backupdir = '../../tmp/backup';
-Perform backup
-BACKUP DATABASE bup_backupdir TO 'bup_backupdir1.bak';
+# Perform backup
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_1.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM 'bup_backupdir_1.bak' OVERWRITE;
 backup_id
 #
-Ensure backup image file went to the correct location
-/backup/bup_backupdir.bak
-Perform restore
-RESTORE FROM 'bup_backupdir1.bak' OVERWRITE;
+#
+# Do the backup and restore by specifying a path.
+#
+# Perform backup
+BACKUP DATABASE bup_backupdir TO '../bup_backupdir_2.bak';
 backup_id
 #
-Now do the backup and restore by specifying a path.
-Perform backup
-BACKUP DATABASE bup_backupdir TO '../bup_backupdir2.bak';
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM '../bup_backupdir_2.bak' OVERWRITE;
 backup_id
 #
-Ensure backup image file went to the correct location
-Perform restore
-RESTORE FROM '../bup_backupdir2.bak' OVERWRITE;
+#
+# Use yet another path.
+#
+# Perform backup
+BACKUP DATABASE bup_backupdir TO '../../bup_backupdir_3.bak';
 backup_id
 #
-Perform backup
-BACKUP DATABASE bup_backupdir TO '../../bup_backupdir3.bak';
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM '../../bup_backupdir_3.bak' OVERWRITE;
 backup_id
 #
-Ensure backup image file went to the correct location
-Reset backupdir with ending /
+#
+# Set backupdir with ending /
+#
 SET @@global.backupdir = '../../tmp/backup/';
-Perform backup
-BACKUP DATABASE bup_backupdir TO '../../bup_backupdir4.bak';
+# Perform backup
+BACKUP DATABASE bup_backupdir TO '../../bup_backupdir_4.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM '../../bup_backupdir_4.bak' OVERWRITE;
 backup_id
 #
-Ensure backup image file went to the correct location
-Try a backup to an invalid relative path.
-BACKUP DATABASE bup_backupdir TO '../not/there/bup_backupdir5.bak';
-ERROR HY000: Can't create/write to file 'MYSQLTEST_VARDIR/tmp/not/there/bup_backupdir5.bak' (Errcode: #)
-
-Try a backup to an invalid hard path.
-*Actual BACKUP DATABASE command not printed due to non-deterministic path.
-*Performing: 
-*BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir6.bak';
-ERROR HY000: Can't create/write to file 'MYSQLTEST_VARDIR/not/there/either/bup_backupdir6.bak' (Errcode: #)
-
-Attempt to set the backupdir to a really long string.
-set global max_allowed_packet=1024*100;
-
-Now attempt to set the backupdir to 512 characters.
-
-SET @@global.backupdir = repeat('a',####);
+#
+# Attempt backup/restore to/from an invalid relative path.
+#
+BACKUP DATABASE bup_backupdir TO '../not/there/bup_backupdir_x.bak';
+ERROR HY000: Can't create/write to file 'MYSQLTEST_VARDIR/tmp/not/there/bup_backupdir_x.bak' (Errcode: #)
+RESTORE FROM '../not/there/bup_backupdir_x.bak';
+ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/not/there/bup_backupdir_x.bak' not found (Errcode: #)
+# 
+# Attempt backup/restore to/from an invalid hard path.
+#
+# *Actual BACKUP DATABASE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *BACKUP DATABASE bup_backupdir TO
+#  '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
+ERROR HY000: Can't create/write to file 'MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak' (Errcode: #)
+# *Actual RESTORE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *RESTORE FROM
+#  '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
+ERROR HY000: File 'MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak' not found (Errcode: #)
+#
+# Set backupdir to 512 characters.
+#
+SET @@global.backupdir= REPEAT('a',####);
 Warnings:
 Warning	####	The path specified for the system variable backupdir cannot be accessed or is invalid. ref: 
-
-Now attempt to set the backupdir to 513 characters.
-
-SET @@global.backupdir = repeat('a',513);
+#
+# Attempt to set the backupdir to 513 characters.
+#
+SET @@global.backupdir= REPEAT('a', 513);
 ERROR HY000: The path specified for backupdir is too long.
-
-Now attempt to set the backupdir to a really long string.
-
-SET @@global.backupdir = repeat('a',99*1024);
+#
+# Attempt to set the backupdir to a really long string.
+#
+SET GLOBAL max_allowed_packet= 100 * 1024;
+SET @@global.backupdir= REPEAT('a', 99 * 1024);
 ERROR HY000: The path specified for backupdir is too long.
-
-Attempt to set the backupdir to something invalid.
-
-SET @@global.backupdir = 'This_is_really_stupid/not/there/at/all';
+SET GLOBAL max_allowed_packet= DEFAULT;
+#
+# Set backupdir to something invalid.
+#
+SET @@global.backupdir= 'This_is_really_stupid/not/there/at/all';
 Warnings:
 Warning	####	The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
 Warning	####	The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
-set global max_allowed_packet=DEFAULT;
-Cleanup
-Reset backupdir 
-SET @@global.backupdir = @@global.datadir;
+# Attempt backup to a relative path in invalid backupdir.
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
+# Attempt restore from a relative path in invalid backupdir.
+RESTORE FROM 'bup_backupdir_x.bak';
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
+# 
+# Perform backup/restore to/from an absolute path.
+#
+# *Actual BACKUP DATABASE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *BACKUP DATABASE bup_backupdir TO
+#  '$MYSQLTEST_VARDIR/bup_backupdir_5.bak';
+###
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
+# Ensure backup image file went to the correct location
+###
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+# *Actual RESTORE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *RESTORE FROM
+#  '$MYSQLTEST_VARDIR/bup_backupdir_5.bak';
+###
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: This_is_really_stupid/not/there/at/all
+###
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+#
+# Set backupdir to an absolute path outside of datadir.
+#
+# SET @@global.backupdir = '$MYSQL_TEST_DIR';
+# Perform backup
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_6.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM 'bup_backupdir_6.bak' OVERWRITE;
+backup_id
+#
+#
+# Set backupdir to an absolute path with trailing slash.
+#
+# SET @@global.backupdir = '$MYSQL_TEST_DIR/';
+# Perform backup
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_6.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM 'bup_backupdir_6.bak' OVERWRITE;
+backup_id
+#
+#
+# Set backupdir to an existing file.
+#
+# Create file.
+# Set backupdir.
+SET @@global.backupdir = '../../tmp/backup/some_file.txt';
+# Attempt backup to a relative path in invalid backupdir.
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+ERROR HY000: Can't create/write to file '/home2/mydev/bzrroot/mysql-6.0-wl4518-1/mysql-test/var/tmp/backup/some_file.txt/bup_backupdir_x.bak' (Errcode: 20)
+# Attempt restore from a relative path in invalid backupdir.
+RESTORE FROM 'bup_backupdir_x.bak';
+ERROR HY000: File '/home2/mydev/bzrroot/mysql-6.0-wl4518-1/mysql-test/var/tmp/backup/some_file.txt/bup_backupdir_x.bak' not found (Errcode: 20)
+# Perform backup to an absolute path.
+# *Actual BACKUP DATABASE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *BACKUP DATABASE bup_backupdir TO
+#  '$MYSQLTEST_VARDIR/bup_backupdir_7.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore from an absolute path.
+# *Actual RESTORE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *RESTORE FROM
+#  '$MYSQLTEST_VARDIR/bup_backupdir_7.bak';
+backup_id
+#
+#
+# Cleanup
+#
 DROP DATABASE bup_backupdir;
+# Reset backupdir 
+SET @@global.backupdir= @old_backupdir;

=== added file 'mysql-test/suite/backup/r/backup_backupdir_not_windows.result'
--- a/mysql-test/suite/backup/r/backup_backupdir_not_windows.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/r/backup_backupdir_not_windows.result	2009-03-12 18:42:46 +0000
@@ -0,0 +1,164 @@
+# Save backupdir 
+SET @old_backupdir= @@backupdir;
+DROP DATABASE IF EXISTS bup_backupdir;
+#
+# Create a database to be used throughout the test case
+#
+CREATE DATABASE bup_backupdir;
+CREATE TABLE bup_backupdir.t1(a INT);
+INSERT INTO bup_backupdir.t1 VALUES (1), (2), (3);
+#
+# Dangling symlink.
+#
+# Ensure that the backup directory does not exist
+# Create a symlink to the not existing directory
+# Set backupdir to the dangling symlink
+SET @@global.backupdir = '../../tmp/backup_symlink';
+Warnings:
+Warning	####	The path specified for the system variable backupdir cannot be accessed or is invalid. ref: ../../tmp/backup_symlink
+# Attempt backup to a relative path in invalid backupdir.
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: ../../tmp/backup_symlink
+# Attempt restore from a relative path in invalid backupdir.
+RESTORE FROM 'bup_backupdir_x.bak';
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: ../../tmp/backup_symlink
+# Perform backup to an absolute path.
+# *Actual BACKUP DATABASE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *BACKUP DATABASE bup_backupdir TO
+#  '$MYSQLTEST_VARDIR/bup_backupdir_1.bak';
+###
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: ../../tmp/backup_symlink
+# Ensure backup image file went to the correct location
+###
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+# Perform restore from an absolute path.
+# *Actual RESTORE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *RESTORE FROM
+#  '$MYSQLTEST_VARDIR/bup_backupdir_1.bak';
+###
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### WARNING! This should work, not fail! See Bug#43536.
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+ERROR HY000: The path specified for the system variable backupdir cannot be accessed or is invalid. ref: ../../tmp/backup_symlink
+###
+### Remove this comment and the next line when Bug#43536 is fixed.
+###
+#
+# Symlink to existing directory.
+#
+# Create a directory for backup image files
+# Set backupdir to symlink
+SET @@global.backupdir = '../../tmp/backup_symlink';
+# Perform backup
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_1.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore
+RESTORE FROM 'bup_backupdir_1.bak' OVERWRITE;
+backup_id
+#
+# Remove symlink
+# Remove backup directory
+#
+# Pipe.
+#
+###
+### Creating a pipe in the same test that sets the backupdir variable
+### lets mysql-test-run hang if the pipe is not deleted before the
+### test ends. See Bug#43570.
+### We do proper cleanup at test end. But if the test ends due to
+### an unexpected error/success, there is no chance to remove the pipe.
+### --disable_abort_on_error avoids termination before cleanup.
+### Remove this comment and the next line when Bug#43570 is fixed.
+###
+# Create a named pipe
+# Set backupdir to the pipe
+SET @@global.backupdir = '../../tmp/backup_fifo';
+# Attempt backup to a relative path in invalid backupdir.
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+ERROR HY000: Can't create/write to file '/home2/mydev/bzrroot/mysql-6.0-wl4518-1/mysql-test/var/tmp/backup_fifo/bup_backupdir_x.bak' (Errcode: 20)
+# Attempt restore from a relative path in invalid backupdir.
+RESTORE FROM 'bup_backupdir_x.bak';
+ERROR HY000: File '/home2/mydev/bzrroot/mysql-6.0-wl4518-1/mysql-test/var/tmp/backup_fifo/bup_backupdir_x.bak' not found (Errcode: 20)
+# Perform backup to an absolute path.
+# *Actual BACKUP DATABASE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *BACKUP DATABASE bup_backupdir TO
+#  '$MYSQLTEST_VARDIR/bup_backupdir_2.bak';
+backup_id
+#
+# Ensure backup image file went to the correct location
+# Perform restore from an absolute path.
+# *Actual RESTORE command not printed due to
+#  non-deterministic path.
+# *Performing: 
+# *RESTORE FROM
+#  '$MYSQLTEST_VARDIR/bup_backupdir_2.bak';
+backup_id
+#
+# Attempt backup into the pipe by using empty file name.
+BACKUP DATABASE bup_backupdir TO '';
+ERROR HY000: Malformed file path ''
+# Attempt restore from the pipe by using empty file name.
+RESTORE FROM '';
+ERROR HY000: Malformed file path ''
+# Perform backup into the pipe by mangling the path.
+BACKUP DATABASE bup_backupdir TO '../backup_fifo';
+# connection con1
+###
+### Normally, the 'connect' command is not logged. But due to
+### the 'disable_abort_on_error' command it is. See Bug#43588.
+### Remove this comment and the next line when Bug#43588 is fixed.
+###
+###
+### Re-enabling query log. See above for an explanation.
+### Remove this comment and the next line when Bug#43588 is fixed.
+###
+# Cat the backup image from the pipe to a file.
+# connection default
+# Receive status from BACKUP
+backup_id
+#
+# Perform restore from the pipe by mangling the path.
+RESTORE FROM '../backup_fifo' OVERWRITE;
+# connection con1
+###
+### Normally, the 'connect' command is not logged. But due to
+### the 'disable_abort_on_error' command it is. See Bug#43588.
+### Remove this comment and the next line when Bug#43588 is fixed.
+###
+###
+### Re-enabling query log. See above for an explanation.
+### Remove this comment and the next line when Bug#43588 is fixed.
+###
+# Cat the backup image from a file to the pipe.
+# connection default
+# Receive status from RESTORE
+backup_id
+#
+# Remove backup image file
+# Remove pipe
+###
+### Re-enabling abort on error. See above for an explanation.
+### Remove this comment and the next line when Bug#43570 is fixed.
+###
+#
+# Cleanup
+#
+DROP DATABASE bup_backupdir;
+# Reset backupdir 
+SET @@global.backupdir= @old_backupdir;

=== modified file 'mysql-test/suite/backup/t/backup_backupdir.test'
--- a/mysql-test/suite/backup/t/backup_backupdir.test	2009-02-26 22:19:09 +0000
+++ b/mysql-test/suite/backup/t/backup_backupdir.test	2009-03-12 18:42:46 +0000
@@ -1,151 +1,363 @@
 #
 # This test is designed to test the new backupdir variable.
+# BUG#35230 Backup: no backupdir
+# Chuck Bell, 2008-08-08
+# Ingo Struewing, 2009-03-12, WL#4518 - Online Backup: Test backupdir variable
 #
 
 --source include/not_embedded.inc
 
 # Suppress warning about expected backup/restore errors
-disable_query_log;
+--disable_query_log
 call mtr.add_suppression("Backup:");
 call mtr.add_suppression("Restore:");
-enable_query_log;
-
-let $MYSQLD_DATADIR= `select @@datadir`;
+--enable_query_log
 
---echo Reset backupdir 
-SET @@global.backupdir = @@global.datadir;
+--echo # Save backupdir 
+SET @old_backupdir= @@backupdir;
 
 --disable_warnings
 DROP DATABASE IF EXISTS bup_backupdir;
 --enable_warnings
 
---echo Create a database
+--echo #
+--echo # Create a database to be used throughout the test case
+--echo #
 CREATE DATABASE bup_backupdir;
 CREATE TABLE bup_backupdir.t1(a INT);
 INSERT INTO bup_backupdir.t1 VALUES (1), (2), (3);
 
-#
-# The following tests the backupdir variable by changing it to
-# redirect the output of the backup command/input of the restore
-# command.
-#
-
+--echo #
+--echo # Create a backup directory to be used throughout the test case
+--echo #
 --error 0,1,2
-rmdir $MYSQLTEST_VARDIR/tmp/backup;
+--rmdir $MYSQLTEST_VARDIR/tmp/backup
+--mkdir $MYSQLTEST_VARDIR/tmp/backup
 
---echo Create a directory for backup images
-mkdir $MYSQLTEST_VARDIR/tmp/backup;
+--echo #
+--echo # The following tests the backupdir variable by changing it to redirect
+--echo # the output of the backup command/input of the restore command.
+--echo #
 
---echo Reset backupdir 
+--echo # Set backupdir 
 SET @@global.backupdir = '../../tmp/backup';
 
---echo Perform backup
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_1.bak';
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo # Perform restore
 --replace_column 1 #
-BACKUP DATABASE bup_backupdir TO 'bup_backupdir1.bak';
+RESTORE FROM 'bup_backupdir_1.bak' OVERWRITE;
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo #
+--echo # Do the backup and restore by specifying a path.
+--echo #
 
---echo Ensure backup image file went to the correct location
---echo $MYSQLTEST_DIR/backup/bup_backupdir.bak
---file_exists $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir1.bak
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/bup_backupdir_2.bak
 
---echo Perform restore
+--echo # Perform backup
 --replace_column 1 #
-RESTORE FROM 'bup_backupdir1.bak' OVERWRITE;
+BACKUP DATABASE bup_backupdir TO '../bup_backupdir_2.bak';
 
---echo Now do the backup and restore by specifying a path.
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/tmp/bup_backupdir_2.bak
 
---echo Perform backup
+--echo # Perform restore
 --replace_column 1 #
-BACKUP DATABASE bup_backupdir TO '../bup_backupdir2.bak';
+RESTORE FROM '../bup_backupdir_2.bak' OVERWRITE;
+--remove_file $MYSQLTEST_VARDIR/tmp/bup_backupdir_2.bak
 
---echo Ensure backup image file went to the correct location
---file_exists $MYSQLTEST_VARDIR/tmp/bup_backupdir2.bak
+--echo #
+--echo # Use yet another path.
+--echo #
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_3.bak
 
---echo Perform restore
+--echo # Perform backup
 --replace_column 1 #
-RESTORE FROM '../bup_backupdir2.bak' OVERWRITE;
+BACKUP DATABASE bup_backupdir TO '../../bup_backupdir_3.bak';
 
---echo Perform backup
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_3.bak
+
+--echo # Perform restore
 --replace_column 1 #
-BACKUP DATABASE bup_backupdir TO '../../bup_backupdir3.bak';
+RESTORE FROM '../../bup_backupdir_3.bak' OVERWRITE;
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_3.bak
 
---echo Ensure backup image file went to the correct location
---file_exists $MYSQLTEST_VARDIR/bup_backupdir3.bak
+--echo #
+--echo # Set backupdir with ending /
+--echo #
 
---echo Reset backupdir with ending /
 SET @@global.backupdir = '../../tmp/backup/';
 
---echo Perform backup
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_4.bak
+
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE bup_backupdir TO '../../bup_backupdir_4.bak';
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_4.bak
+
+--echo # Perform restore
 --replace_column 1 #
-BACKUP DATABASE bup_backupdir TO '../../bup_backupdir4.bak';
+RESTORE FROM '../../bup_backupdir_4.bak' OVERWRITE;
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_4.bak
 
---echo Ensure backup image file went to the correct location
---file_exists $MYSQLTEST_VARDIR/bup_backupdir4.bak
+--echo #
+--echo # Attempt backup/restore to/from an invalid relative path.
+--echo #
 
---echo Try a backup to an invalid relative path.
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --replace_regex /Errcode: [0-9]+/Errcode: #/
 --error 1
-BACKUP DATABASE bup_backupdir TO '../not/there/bup_backupdir5.bak';
+BACKUP DATABASE bup_backupdir TO '../not/there/bup_backupdir_x.bak';
 
---echo 
---echo Try a backup to an invalid hard path.
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /Errcode: [0-9]+/Errcode: #/
+--error 29
+RESTORE FROM '../not/there/bup_backupdir_x.bak';
 
---echo *Actual BACKUP DATABASE command not printed due to non-deterministic path.
---echo *Performing: 
---echo *BACKUP DATABASE bup_backupdir TO '\$MYSQLTEST_VARDIR/not/there/either/bup_backupdir6.bak';
-# Do not print the SQL command to result file because dir is not deterministic across hosts
+--echo # 
+--echo # Attempt backup/restore to/from an invalid hard path.
+--echo #
+
+--echo # *Actual BACKUP DATABASE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *BACKUP DATABASE bup_backupdir TO
+--echo #  '\$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
 --disable_query_log
-# Replace actual dir in error message because $MYSQLTEST_VARDIR is not deterministic
+# Replace actual dir in error message because $MYSQLTEST_VARDIR
+# is not deterministic
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 --replace_regex /Errcode: [0-9]+/Errcode: #/
 --error 1
---eval BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir6.bak';
+eval BACKUP DATABASE bup_backupdir TO
+  '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
 --enable_query_log
 
---echo
---echo Attempt to set the backupdir to a really long string.
-
-set global max_allowed_packet=1024*100;
+--echo # *Actual RESTORE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *RESTORE FROM
+--echo #  '\$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
+--disable_query_log
+# Replace actual dir in error message because $MYSQLTEST_VARDIR
+# is not deterministic
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /Errcode: [0-9]+/Errcode: #/
+--error 29
+eval RESTORE FROM
+  '$MYSQLTEST_VARDIR/not/there/either/bup_backupdir_x.bak';
+--enable_query_log
 
---echo
---echo Now attempt to set the backupdir to 512 characters.
---echo
+--echo #
+--echo # Set backupdir to 512 characters.
+--echo #
 # Mask out the error value on the warning.
 --replace_regex /[0000-9999]+/####/
-SET @@global.backupdir = repeat('a',512);
+SET @@global.backupdir= REPEAT('a',512);
 
---echo
---echo Now attempt to set the backupdir to 513 characters.
---echo
+--echo #
+--echo # Attempt to set the backupdir to 513 characters.
+--echo #
 --error ER_PATH_LENGTH
-SET @@global.backupdir = repeat('a',513);
+SET @@global.backupdir= REPEAT('a', 513);
 
---echo
---echo Now attempt to set the backupdir to a really long string.
---echo
+--echo #
+--echo # Attempt to set the backupdir to a really long string.
+--echo #
+SET GLOBAL max_allowed_packet= 100 * 1024;
 --error ER_PATH_LENGTH
-SET @@global.backupdir = repeat('a',99*1024);
+SET @@global.backupdir= REPEAT('a', 99 * 1024);
+SET GLOBAL max_allowed_packet= DEFAULT;
 
---echo
---echo Attempt to set the backupdir to something invalid.
---echo
+
+--echo #
+--echo # Set backupdir to something invalid.
+--echo #
 # Mask out the error value on the warning.
 --replace_regex /[0000-9999]+/####/
-SET @@global.backupdir = 'This_is_really_stupid/not/there/at/all';
+SET @@global.backupdir= 'This_is_really_stupid/not/there/at/all';
+
+--echo # Attempt backup to a relative path in invalid backupdir.
+--error ER_BACKUP_BACKUPDIR
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+
+--echo # Attempt restore from a relative path in invalid backupdir.
+--error ER_BACKUP_BACKUPDIR
+RESTORE FROM 'bup_backupdir_x.bak';
+
+--echo # 
+--echo # Perform backup/restore to/from an absolute path.
+--echo #
 
-set global max_allowed_packet=DEFAULT;
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_5.bak
 
---echo Cleanup
+--echo # *Actual BACKUP DATABASE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *BACKUP DATABASE bup_backupdir TO
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_5.bak';
+--disable_query_log
+--replace_column 1 #
+--echo ###
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error ER_BACKUP_BACKUPDIR
+eval BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/bup_backupdir_5.bak';
+--enable_query_log
 
---echo Reset backupdir 
-SET @@global.backupdir = @@global.datadir;
+--echo # Ensure backup image file went to the correct location
+--echo ###
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error 1
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_5.bak
 
-DROP DATABASE bup_backupdir;
+--echo # *Actual RESTORE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *RESTORE FROM
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_5.bak';
+--disable_query_log
+--replace_column 1 #
+--echo ###
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error ER_BACKUP_BACKUPDIR
+eval RESTORE FROM '$MYSQLTEST_VARDIR/bup_backupdir_5.bak' OVERWRITE;
+--enable_query_log
+--echo ###
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error 1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_5.bak
 
-remove_file $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir1.bak;
-remove_file $MYSQLTEST_VARDIR/tmp/bup_backupdir2.bak;
-remove_file $MYSQLTEST_VARDIR/bup_backupdir3.bak;
-remove_file $MYSQLTEST_VARDIR/bup_backupdir4.bak;
+--echo #
+--echo # Set backupdir to an absolute path outside of datadir.
+--echo #
+
+--echo # SET @@global.backupdir = '\$MYSQL_TEST_DIR';
+--disable_query_log
+eval SET @@global.backupdir = '$MYSQL_TEST_DIR';
+--enable_query_log
+
+--error 0,1
+--remove_file $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_6.bak';
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo # Perform restore
+--replace_column 1 #
+RESTORE FROM 'bup_backupdir_6.bak' OVERWRITE;
+--remove_file $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo #
+--echo # Set backupdir to an absolute path with trailing slash.
+--echo #
+
+--echo # SET @@global.backupdir = '\$MYSQL_TEST_DIR/';
+--disable_query_log
+eval SET @@global.backupdir = '$MYSQL_TEST_DIR/';
+--enable_query_log
 
 --error 0,1
-rmdir $MYSQLTEST_VARDIR/tmp/backup;
+--remove_file $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_6.bak';
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo # Perform restore
+--replace_column 1 #
+RESTORE FROM 'bup_backupdir_6.bak' OVERWRITE;
+--remove_file $MYSQL_TEST_DIR/bup_backupdir_6.bak
+
+--echo #
+--echo # Set backupdir to an existing file.
+--echo #
+
+--echo # Create file.
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/some_file.txt
+--write_file $MYSQLTEST_VARDIR/tmp/backup/some_file.txt EOF
+blabla
+EOF
+--echo # Set backupdir.
+SET @@global.backupdir = '../../tmp/backup/some_file.txt';
+
+--echo # Attempt backup to a relative path in invalid backupdir.
+--error 1
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+
+--echo # Attempt restore from a relative path in invalid backupdir.
+--error 29
+RESTORE FROM 'bup_backupdir_x.bak';
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_7.bak
+
+--echo # Perform backup to an absolute path.
+--echo # *Actual BACKUP DATABASE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *BACKUP DATABASE bup_backupdir TO
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_7.bak';
+--disable_query_log
+--replace_column 1 #
+eval BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/bup_backupdir_7.bak';
+--enable_query_log
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_7.bak
+
+--echo # Perform restore from an absolute path.
+--echo # *Actual RESTORE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *RESTORE FROM
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_7.bak';
+--disable_query_log
+--replace_column 1 #
+eval RESTORE FROM '$MYSQLTEST_VARDIR/bup_backupdir_7.bak' OVERWRITE;
+--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_7.bak
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/some_file.txt
+
+--echo #
+--echo # Cleanup
+--echo #
+DROP DATABASE bup_backupdir;
+--rmdir $MYSQLTEST_VARDIR/tmp/backup
+--echo # Reset backupdir 
+SET @@global.backupdir= @old_backupdir;
+

=== added file 'mysql-test/suite/backup/t/backup_backupdir_not_windows.test'
--- a/mysql-test/suite/backup/t/backup_backupdir_not_windows.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/t/backup_backupdir_not_windows.test	2009-03-12 18:42:46 +0000
@@ -0,0 +1,274 @@
+#
+# This test is designed to test the new backupdir variable
+# with symbolic links, named pipes, or other stuff that
+# does not work in this way on Windows.
+# WL#4518 - Online Backup: Test backupdir variable
+# Ingo Struewing, 2009-03-12
+#
+
+--source include/not_embedded.inc
+--source include/not_windows.inc
+
+# Suppress warning about expected backup/restore errors
+--disable_query_log
+call mtr.add_suppression("Backup:");
+call mtr.add_suppression("Restore:");
+--enable_query_log
+
+--echo # Save backupdir 
+SET @old_backupdir= @@backupdir;
+
+--disable_warnings
+DROP DATABASE IF EXISTS bup_backupdir;
+--enable_warnings
+
+--echo #
+--echo # Create a database to be used throughout the test case
+--echo #
+CREATE DATABASE bup_backupdir;
+CREATE TABLE bup_backupdir.t1(a INT);
+INSERT INTO bup_backupdir.t1 VALUES (1), (2), (3);
+
+--echo #
+--echo # Dangling symlink.
+--echo #
+
+--echo # Ensure that the backup directory does not exist
+--error 0,1,2
+--rmdir $MYSQLTEST_VARDIR/tmp/backup
+
+--echo # Create a symlink to the not existing directory
+--exec ln -s backup $MYSQLTEST_VARDIR/tmp/backup_symlink
+
+--echo # Set backupdir to the dangling symlink
+# Mask out the error value on the warning.
+--replace_regex /[0000-9999]+/####/
+SET @@global.backupdir = '../../tmp/backup_symlink';
+
+--echo # Attempt backup to a relative path in invalid backupdir.
+--error ER_BACKUP_BACKUPDIR
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+
+--echo # Attempt restore from a relative path in invalid backupdir.
+--error ER_BACKUP_BACKUPDIR
+RESTORE FROM 'bup_backupdir_x.bak';
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_1.bak
+
+--echo # Perform backup to an absolute path.
+--echo # *Actual BACKUP DATABASE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *BACKUP DATABASE bup_backupdir TO
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_1.bak';
+--disable_query_log
+--replace_column 1 #
+--echo ###
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error ER_BACKUP_BACKUPDIR
+eval BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/bup_backupdir_1.bak';
+--enable_query_log
+
+--echo # Ensure backup image file went to the correct location
+--echo ###
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error 1
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_1.bak
+
+--echo # Perform restore from an absolute path.
+--echo # *Actual RESTORE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *RESTORE FROM
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_1.bak';
+--disable_query_log
+--replace_column 1 #
+--echo ###
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### WARNING! This should work, not fail! See Bug#43536.
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error ER_BACKUP_BACKUPDIR
+eval RESTORE FROM '$MYSQLTEST_VARDIR/bup_backupdir_1.bak' OVERWRITE;
+--enable_query_log
+--echo ###
+--echo ### Remove this comment and the next line when Bug#43536 is fixed.
+--echo ###
+--error 1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_1.bak
+
+--echo #
+--echo # Symlink to existing directory.
+--echo #
+
+--echo # Create a directory for backup image files
+--mkdir $MYSQLTEST_VARDIR/tmp/backup
+
+--echo # Set backupdir to symlink
+SET @@global.backupdir = '../../tmp/backup_symlink';
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_1.bak';
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo # Perform restore
+--replace_column 1 #
+RESTORE FROM 'bup_backupdir_1.bak' OVERWRITE;
+--remove_file $MYSQLTEST_VARDIR/tmp/backup/bup_backupdir_1.bak
+
+--echo # Remove symlink
+--remove_file $MYSQLTEST_VARDIR/tmp/backup_symlink
+
+--echo # Remove backup directory
+--rmdir $MYSQLTEST_VARDIR/tmp/backup
+
+--echo #
+--echo # Pipe.
+--echo #
+
+--echo ###
+--echo ### Creating a pipe in the same test that sets the backupdir variable
+--echo ### lets mysql-test-run hang if the pipe is not deleted before the
+--echo ### test ends. See Bug#43570.
+--echo ### We do proper cleanup at test end. But if the test ends due to
+--echo ### an unexpected error/success, there is no chance to remove the pipe.
+--echo ### --disable_abort_on_error avoids termination before cleanup.
+--echo ### Remove this comment and the next line when Bug#43570 is fixed.
+--echo ###
+--disable_abort_on_error
+
+--echo # Create a named pipe
+--exec mkfifo $MYSQLTEST_VARDIR/tmp/backup_fifo
+
+--echo # Set backupdir to the pipe
+# Mask out the error value on the warning.
+--replace_regex /[0000-9999]+/####/
+SET @@global.backupdir = '../../tmp/backup_fifo';
+
+--echo # Attempt backup to a relative path in invalid backupdir.
+--error 1
+BACKUP DATABASE bup_backupdir TO 'bup_backupdir_x.bak';
+
+--echo # Attempt restore from a relative path in invalid backupdir.
+--error 29
+RESTORE FROM 'bup_backupdir_x.bak';
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_2.bak
+
+--echo # Perform backup to an absolute path.
+--echo # *Actual BACKUP DATABASE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *BACKUP DATABASE bup_backupdir TO
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_2.bak';
+--disable_query_log
+--replace_column 1 #
+eval BACKUP DATABASE bup_backupdir TO '$MYSQLTEST_VARDIR/bup_backupdir_2.bak';
+--enable_query_log
+
+--echo # Ensure backup image file went to the correct location
+--file_exists $MYSQLTEST_VARDIR/bup_backupdir_2.bak
+
+--echo # Perform restore from an absolute path.
+--echo # *Actual RESTORE command not printed due to
+--echo #  non-deterministic path.
+--echo # *Performing: 
+--echo # *RESTORE FROM
+--echo #  '\$MYSQLTEST_VARDIR/bup_backupdir_2.bak';
+--disable_query_log
+--replace_column 1 #
+eval RESTORE FROM '$MYSQLTEST_VARDIR/bup_backupdir_2.bak' OVERWRITE;
+--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/bup_backupdir_2.bak
+
+--echo # Attempt backup into the pipe by using empty file name.
+--error ER_BAD_PATH
+BACKUP DATABASE bup_backupdir TO '';
+
+--echo # Attempt restore from the pipe by using empty file name.
+--error ER_BAD_PATH
+RESTORE FROM '';
+
+--echo # Perform backup into the pipe by mangling the path.
+# This is somewhat quirky as there is no way to navigate from a pipe.
+send BACKUP DATABASE bup_backupdir TO '../backup_fifo';
+    --echo # connection con1
+    --echo ###
+    --echo ### Normally, the 'connect' command is not logged. But due to
+    --echo ### the 'disable_abort_on_error' command it is. See Bug#43588.
+    --echo ### Remove this comment and the next line when Bug#43588 is fixed.
+    --echo ###
+    --disable_query_log
+    --connect (con1,localhost,root,,)
+    --echo ###
+    --echo ### Re-enabling query log. See above for an explanation.
+    --echo ### Remove this comment and the next line when Bug#43588 is fixed.
+    --echo ###
+    --enable_query_log
+    --echo # Cat the backup image from the pipe to a file.
+    --exec cat $MYSQLTEST_VARDIR/tmp/backup_fifo > $MYSQLTEST_VARDIR/tmp/backup_file
+    --disconnect con1
+--echo # connection default
+--connection default
+--echo # Receive status from BACKUP
+--replace_column 1 #
+reap;
+
+--echo # Perform restore from the pipe by mangling the path.
+# This is somewhat quirky as there is no way to navigate from a pipe.
+send RESTORE FROM '../backup_fifo' OVERWRITE;
+    --echo # connection con1
+    --echo ###
+    --echo ### Normally, the 'connect' command is not logged. But due to
+    --echo ### the 'disable_abort_on_error' command it is. See Bug#43588.
+    --echo ### Remove this comment and the next line when Bug#43588 is fixed.
+    --echo ###
+    --disable_query_log
+    --connect (con1,localhost,root,,)
+    --echo ###
+    --echo ### Re-enabling query log. See above for an explanation.
+    --echo ### Remove this comment and the next line when Bug#43588 is fixed.
+    --echo ###
+    --enable_query_log
+    --echo # Cat the backup image from a file to the pipe.
+    --exec cat $MYSQLTEST_VARDIR/tmp/backup_file > $MYSQLTEST_VARDIR/tmp/backup_fifo
+    --disconnect con1
+--echo # connection default
+--connection default
+--echo # Receive status from RESTORE
+--replace_column 1 #
+reap;
+
+--echo # Remove backup image file
+--remove_file $MYSQLTEST_VARDIR/tmp/backup_file
+
+--echo # Remove pipe
+--remove_file $MYSQLTEST_VARDIR/tmp/backup_fifo
+
+--echo ###
+--echo ### Re-enabling abort on error. See above for an explanation.
+--echo ### Remove this comment and the next line when Bug#43570 is fixed.
+--echo ###
+--enable_abort_on_error
+
+--echo #
+--echo # Cleanup
+--echo #
+DROP DATABASE bup_backupdir;
+--echo # Reset backupdir 
+SET @@global.backupdir= @old_backupdir;
+


Attachment: [text/bzr-bundle] bzr/ingo.struewing@sun.com-20090312184246-2fiibhf9wn1xcw0j.bundle
Thread
bzr commit into mysql-6.0 branch (ingo.struewing:2791) WL#4518Ingo Struewing12 Mar