2860 Hema Sridharan 2009-08-18
BUG#46758 (backup_no_data test fails in mtr)
The backup_no_data fails because of BUG#46765
where test database produces warnings during restore.
This bug fix will not use BACKUP DATABASE * in the test case.
modified:
mysql-test/suite/backup/r/backup_no_data.result
mysql-test/suite/backup/t/backup_no_data.test
mysql-test/suite/backup/t/disabled.def
2859 Chuck Bell 2009-08-13 [merge]
Local merge before push for BUG#34202
modified:
mysql-test/suite/backup/r/backup_pipe.result
mysql-test/suite/backup/r/backup_xpfm_compat_restore_lctn2.result
mysql-test/suite/backup/t/backup_pipe.test
mysql-test/suite/backup/t/backup_xpfm_compat_restore_lctn2.test
sql/backup/kernel.cc
sql/backup/stream.cc
sql/backup/stream.h
=== modified file 'mysql-test/suite/backup/r/backup_no_data.result'
--- a/mysql-test/suite/backup/r/backup_no_data.result 2008-12-06 00:24:23 +0000
+++ b/mysql-test/suite/backup/r/backup_no_data.result 2009-08-18 16:51:05 +0000
@@ -5,7 +5,7 @@ CREATE DATABASE other_db;
BACKUP DATABASE empty_db TO 'empty_db.bak';
backup_id
#
-BACKUP DATABASE * TO 'all.bak';
+BACKUP DATABASE empty_db, other_db TO 'all.bak';
backup_id
#
DROP DATABASE empty_db;
@@ -16,7 +16,7 @@ information_schema
mtr
mysql
test
-RESTORE FROM 'all.bak' OVERWRITE;
+RESTORE FROM 'all.bak';
backup_id
#
SHOW DATABASES;
@@ -59,7 +59,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
`dir_code` char(4),
`building` char(6)
-) ENGINE=MYISAM DEFAULT CHARSET=latin1;
+) DEFAULT CHARSET=latin1;
BACKUP DATABASE empty_db TO 'empty_db.bak';
backup_id
#
=== modified file 'mysql-test/suite/backup/t/backup_no_data.test'
--- a/mysql-test/suite/backup/t/backup_no_data.test 2009-02-24 20:57:21 +0000
+++ b/mysql-test/suite/backup/t/backup_no_data.test 2009-08-18 16:51:05 +0000
@@ -21,8 +21,14 @@ BACKUP DATABASE empty_db TO 'empty_db.ba
--error 0,1
--remove_file $MYSQLD_BACKUPDIR/all.bak
+
+# The BACKUP DATABASE * TO 'all.bak' is disabled because of BUG#46765
+# BUG#46765: Restore throws warnings when performing backup of test database.
+# Once this bug is fixed, please enable the "BACKUP DATABASE *..."
+
--replace_column 1 #
-BACKUP DATABASE * TO 'all.bak';
+#BACKUP DATABASE * TO 'all.bak';
+BACKUP DATABASE empty_db, other_db TO 'all.bak';
DROP DATABASE empty_db;
DROP DATABASE other_db;
@@ -30,7 +36,8 @@ DROP DATABASE other_db;
SHOW DATABASES;
--replace_column 1 #
-RESTORE FROM 'all.bak' OVERWRITE;
+#RESTORE FROM 'all.bak' OVERWRITE;
+RESTORE FROM 'all.bak';
SHOW DATABASES;
@@ -77,18 +84,24 @@ SHOW TABLES;
--disable_warnings
DROP DATABASE IF EXISTS empty_db;
DROP DATABASE IF EXISTS other_db;
-#
-# Normally, when tests are run the test/ directory corresponding to the test database
-# is empty. In particular, it doesn't contain the db.opt file storing database settings.
-# Some tests rely on that, as they use server options to determine these settings.
-# If we backup test database (e.g., with "BACKUP DATABASE * ...") and then restore it,
-# then it will be created using "CREATE DATABASE test" statement and this will create
-# the db.opt file. As a result, some tests run after that will fail. To avoid this situation
-# we remove the test/db.opt file as a part of clean-up.
-#
---error 0,1
---remove_file $MYSQLD_BACKUPDIR/test/db.opt
---enable_warnings
+
+# Normally when the tests are run, the test/ directory corrosponding to the
+# test database is empty and doesn't contain the db.opt file storing database
+# settings. Some tests rely on that, as they use server options to determine
+# these settings. If we backup test database (e.g. with "BACKUP DATABASE * ..")
+# and then restore it, then it will be created using "CREATE DATABASE test"
+# statement and this will create the db.opt file. As a result, some tests run
+# after that will fail. To avoid this situation we remove the test/db.opt file
+# as a part of clean-up.
+
+
+# The below lines are commented as we are not performing backup / restore of
+# test database. Please enable the commented lines when BACKUP DATABASE * TO ..
+# is performed after fix of BUG#46765
+
+#--error 0,1
+#--remove_file $MYSQLD_BACKUPDIR/test/db.opt
+#--enable_warnings
--error 0,1
--remove_file $MYSQLD_BACKUPDIR/all.bak
=== modified file 'mysql-test/suite/backup/t/disabled.def'
--- a/mysql-test/suite/backup/t/disabled.def 2009-06-25 09:29:53 +0000
+++ b/mysql-test/suite/backup/t/disabled.def 2009-08-18 16:51:05 +0000
@@ -9,4 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-backup_no_data : Bug#42756 2009-02-11 jorgen Test db state not preserved
| Thread |
|---|
| • bzr push into mysql-6.0-backup branch (hema:2859 to 2860) Bug#46758 Bug#46765 | Hema Sridharan | 18 Aug |