#At file:///localhome/jl208045/mysql/mysql-6.0-backup-reenable/
2769 Jorgen Loland 2009-02-12
Bug#41360 - backup_views fails after merge of main and backup trees
The backup error stack was reordered a while ago to match the ordering of the server
error stack. When a view cannot be restored due to a missing dependency, the top-level
error ER_BACKUP_CANT_RESTORE_VIEW is now displayed, whereas the underlying problem
ER_NO_SUCH_TABLE was displayed earlier. This patch changes the backup_views test to
accommodate this reordering.
modified:
mysql-test/suite/backup/r/backup_views.result
mysql-test/suite/backup/t/backup_views.test
mysql-test/suite/backup/t/disabled.def
per-file messages:
mysql-test/suite/backup/r/backup_views.result
Change test to accomodate for error stack reordering.
mysql-test/suite/backup/t/backup_views.test
Change test to accomodate for error stack reordering.
mysql-test/suite/backup/t/disabled.def
Reenable backup_views test
=== modified file 'mysql-test/suite/backup/r/backup_views.result'
--- a/mysql-test/suite/backup/r/backup_views.result 2008-12-10 15:53:06 +0000
+++ b/mysql-test/suite/backup/r/backup_views.result 2009-02-12 06:42:25 +0000
@@ -199,7 +199,7 @@ aa4 28 MS
aa6 30 Doctor
aa7 31 Lawyer
aa5 43 PHD
-SELECT * FROM bup_db2.vv;
+SELECT * FROM bup_db2.vv ORDER BY N;
N A E
aa1 23 BS
aa2 24 BE
@@ -277,10 +277,10 @@ DROP DATABASE bup_db2;
Restore database.
restore database with view dependency to other, non-existing db
RESTORE FROM 'bup_objectview1.bak';
-ERROR 42S02: Table 'bup_db2.t2' doesn't exist
+ERROR HY000: Could not restore view `bup_db1`.`v5`. Please check the view definition for possible missing dependencies.
DROP DATABASE bup_db1;
RESTORE FROM 'bup_objectview2.bak';
-ERROR 42S02: Table 'bup_db1.t3' doesn't exist
+ERROR HY000: Could not restore view `bup_db2`.`student_details`. Please check the view definition for possible missing dependencies.
DROP DATABASE bup_db2;
RESTORE FROM 'bup_objectview.bak';
backup_id
@@ -426,7 +426,7 @@ aa4 28 MS
aa6 30 Doctor
aa7 31 Lawyer
aa5 43 PHD
-SELECT * FROM bup_db2.vv;
+SELECT * FROM bup_db2.vv ORDER BY N;
N A E
aa1 23 BS
aa2 24 BE
=== modified file 'mysql-test/suite/backup/t/backup_views.test'
--- a/mysql-test/suite/backup/t/backup_views.test 2008-12-24 10:48:24 +0000
+++ b/mysql-test/suite/backup/t/backup_views.test 2009-02-12 06:42:25 +0000
@@ -173,7 +173,7 @@ SELECT * FROM bup_db1.v6 ORDER BY educat
SELECT * FROM bup_db2.t2 ORDER BY age;
SELECT * FROM bup_db2.v2 ORDER BY age;
SELECT * FROM bup_db2.v3 ORDER BY age;
-SELECT * FROM bup_db2.vv;
+SELECT * FROM bup_db2.vv ORDER BY N;
SELECT * FROM bup_db2.student_details; #view v4 is renamed as student_details
#Show the data and Create statements
@@ -213,14 +213,14 @@ DROP DATABASE bup_db2;
--echo restore database with view dependency to other, non-existing db
---error ER_NO_SUCH_TABLE
+--error ER_BACKUP_CANT_RESTORE_VIEW
RESTORE FROM 'bup_objectview1.bak';
# An incomplete bup_db1 was created by the failing restore operation.
# Remove it before trying restore of bup_db2.
DROP DATABASE bup_db1;
---error ER_NO_SUCH_TABLE
+--error ER_BACKUP_CANT_RESTORE_VIEW
RESTORE FROM 'bup_objectview2.bak';
# An incomplete bup_db2 was created by the failing restore operation.
@@ -256,7 +256,7 @@ SELECT * FROM bup_db1.v6 ORDER BY educat
SELECT * FROM bup_db2.t2 ORDER BY age;
SELECT * FROM bup_db2.v2 ORDER BY age;
SELECT * FROM bup_db2.v3 ORDER BY age;
-SELECT * FROM bup_db2.vv;
+SELECT * FROM bup_db2.vv ORDER BY N;
SELECT * FROM bup_db2.student_details;
#Alter table t1 and take BACKUP to see if view is not affected.
=== modified file 'mysql-test/suite/backup/t/disabled.def'
--- a/mysql-test/suite/backup/t/disabled.def 2009-02-11 12:15:12 +0000
+++ b/mysql-test/suite/backup/t/disabled.def 2009-02-12 06:42:25 +0000
@@ -11,6 +11,5 @@
##############################################################################
backup_no_engine : Bug#36021 2008-04-13 rsomla server crashes when openning table with unknown storage engine
backup_triggers_and_events : Bug#37762 2008-07-01 rafal Test fails on remove_file for unknown reasons
-backup_views : Bug#41360 2008-12-10 ingo Test fails after merge of main and backup trees
backup_no_data : Bug#42756 2009-02-11 jorgen Test db state not preserved
backup_ddl_blocker : Bug#42756 2009-02-11 jorgen Test db state not preserved
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (jorgen.loland:2769) Bug#41360 | Jorgen Loland | 12 Feb |