summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sql_sequence/mysqldump.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-01-13 18:36:48 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-01-26 10:41:02 +0100
commitc207f04eccf2a1f35e6bac2b8146f6c5e0643857 (patch)
tree237ae02c081a8d797cf3834801839837926005db /mysql-test/suite/sql_sequence/mysqldump.test
parent75538f94ca06915ddc22458b82b8e148e51dd0db (diff)
downloadmariadb-git-bb-10.3-MDEV-21785.tar.gz
MDEV-21785: sequences used as default by other table not dumped in right order by mysqldumpbb-10.3-MDEV-21785
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.
Diffstat (limited to 'mysql-test/suite/sql_sequence/mysqldump.test')
-rw-r--r--mysql-test/suite/sql_sequence/mysqldump.test11
1 files changed, 11 insertions, 0 deletions
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;
#