From c207f04eccf2a1f35e6bac2b8146f6c5e0643857 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 13 Jan 2021 18:36:48 +0100 Subject: MDEV-21785: sequences used as default by other table not dumped in right order by mysqldump Dump sequences first. This atch made to keep it small and to keep number of queries to the server the same. Order of tables in a dump can not be changed (except sequences first) because mysql_list_tables uses SHOW TABLES and I used SHOW FULL TABLES. --- mysql-test/suite/sql_sequence/mysqldump.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/suite/sql_sequence/mysqldump.test') diff --git a/mysql-test/suite/sql_sequence/mysqldump.test b/mysql-test/suite/sql_sequence/mysqldump.test index 308f06d5e8d..d2afb2fd675 100644 --- a/mysql-test/suite/sql_sequence/mysqldump.test +++ b/mysql-test/suite/sql_sequence/mysqldump.test @@ -11,7 +11,18 @@ CREATE SEQUENCE a1 engine=aria; CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; insert into t1 values (1),(2); CREATE SEQUENCE x1 engine=innodb; +--echo # dump whole database --exec $MYSQL_DUMP --compact test +--echo # dump by tables order 1 +--exec $MYSQL_DUMP --compact --tables test t1 a1 x1 +--echo # dump by tables order 2 +--exec $MYSQL_DUMP --compact --tables test a1 t1 x1 +--echo # dump by tables only tables +--exec $MYSQL_DUMP --compact --tables test t1 +--echo # dump by tables only sequences +--exec $MYSQL_DUMP --compact --tables test a1 x1 +--echo # end of dumps + DROP TABLE a1,t1,x1; # -- cgit v1.2.1