diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-01-10 19:35:45 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-01-10 19:35:45 +0100 |
commit | 7331c661dbb71b0826bfaf28e3fbe34411c6f8e4 (patch) | |
tree | 8d7ea5bf926f4ec0eaa5c7d7ec52ae0fff8720f2 /mysql-test/suite/mariabackup | |
parent | 4a872ae1e725b8d17f8266a9ca33a2aca4285c00 (diff) | |
download | mariadb-git-7331c661dbb71b0826bfaf28e3fbe34411c6f8e4.tar.gz |
MDEV-18201 : mariabackup- fix processing of rename/create sequence in prepare
Fix one more bug in "DDL redo" phase in prepare
If table was renamed, and then new table was created with the old name,
prepare can be confused, and .ibd can end up with wrong name.
Fix the order of how DDL fixup is applied , once again - ".new" files
should be processed after renames.
Diffstat (limited to 'mysql-test/suite/mariabackup')
-rw-r--r-- | mysql-test/suite/mariabackup/rename_during_backup.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/mariabackup/rename_during_backup.test | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.result b/mysql-test/suite/mariabackup/rename_during_backup.result index 6e8f365f643..a4cf06b7633 100644 --- a/mysql-test/suite/mariabackup/rename_during_backup.result +++ b/mysql-test/suite/mariabackup/rename_during_backup.result @@ -4,6 +4,8 @@ CREATE TABLE t2(i int) ENGINE INNODB; INSERT INTO t2 values(2); CREATE TABLE t3(i int) ENGINE INNODB; CREATE TABLE t4(i int) ENGINE INNODB; +CREATE TABLE t5(i int) ENGINE INNODB; +INSERT INTO t5 VALUES(5); CREATE TABLE a(a int) ENGINE INNODB; INSERT INTO a values(1); CREATE TABLE b(b CHAR(1)) ENGINE INNODB; @@ -51,3 +53,10 @@ SELECT * FROM b1; a1 1 DROP TABLE a,b,a1,b1; +SELECT * from t5; +i +DROP TABLE t5; +SELECT * from t6; +i +5 +DROP TABLE t6; diff --git a/mysql-test/suite/mariabackup/rename_during_backup.test b/mysql-test/suite/mariabackup/rename_during_backup.test index f176af1451b..238a8b1985c 100644 --- a/mysql-test/suite/mariabackup/rename_during_backup.test +++ b/mysql-test/suite/mariabackup/rename_during_backup.test @@ -10,6 +10,8 @@ INSERT INTO t2 values(2); CREATE TABLE t3(i int) ENGINE INNODB; CREATE TABLE t4(i int) ENGINE INNODB; +CREATE TABLE t5(i int) ENGINE INNODB; +INSERT INTO t5 VALUES(5); CREATE TABLE a(a int) ENGINE INNODB; INSERT INTO a values(1); @@ -28,6 +30,7 @@ INSERT INTO b1 VALUES('b1'); --let after_copy_test_t3=BEGIN NOT ATOMIC RENAME TABLE test.t3 TO test.t3_tmp; INSERT INTO test.t3_tmp VALUES(3); RENAME TABLE test.t3_tmp TO test.t3; END --let before_copy_test_t4=RENAME TABLE test.t4 TO test.t4_tmp --let after_copy_test_t4=RENAME TABLE test.t4_tmp TO test.t4 +--let after_copy_test_t5=BEGIN NOT ATOMIC RENAME TABLE test.t5 TO test.t6; CREATE TABLE test.t5(i int) ENGINE INNODB; END # Test circular renames --let before_copy_test_b=RENAME TABLE test.a to test.tmp, test.b to test.a, test.tmp to test.b @@ -81,6 +84,10 @@ SELECT * FROM a1; SELECT * FROM b1; DROP TABLE a,b,a1,b1; +SELECT * from t5; +DROP TABLE t5; +SELECT * from t6; +DROP TABLE t6; rmdir $targetdir; |