summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-03-19 15:02:09 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-03-25 16:03:22 +0100
commitf9639c2d1a5e24f1a1533b6277fe7eca3aa3c3c0 (patch)
tree22d2cf1c88cfbf3c7caba3bd68a4945101e17924 /mysql-test/t
parent1f7be881414291d91a4cb134b75ed029f90f707d (diff)
downloadmariadb-git-f9639c2d1a5e24f1a1533b6277fe7eca3aa3c3c0.tar.gz
MDEV-22037: Add ability to skip content of some tables (work around for MDEV-20939)
--ignore-table-data parameter added.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/mysqldump.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 7382bd455c8..3f33e4a1d64 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2678,3 +2678,39 @@ select count(*) from t2;
--remove_file $MYSQLTEST_VARDIR/tmp/t2.txt
drop tables t2, t1;
+
+
+--echo #
+--echo # MDEV-22037: Add ability to skip content of some tables
+--echo # (work around for MDEV-20939)
+--echo #
+
+use mysql;
+
+--echo # check that all tables we need are not empty
+
+select count(*) >= 1 from mysql.proc;
+select count(*) >= 1 from mysql.db;
+
+
+--exec $MYSQL_DUMP mysql --ignore-table-data=mysql.db >$MYSQLTEST_VARDIR/tmp/MDEV-20939.sql
+
+
+--echo # for proc we have CREATE and INSERT for all other only CREATE
+
+let SEARCH_RANGE=500000000;
+let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20939.sql;
+let SEARCH_PATTERN=INSERT INTO `proc`;
+source include/search_pattern_in_file.inc;
+let SEARCH_PATTERN=INSERT INTO `db`;
+source include/search_pattern_in_file.inc;
+let SEARCH_PATTERN=CREATE TABLE `db`;
+source include/search_pattern_in_file.inc;
+let SEARCH_PATTERN=CREATE TABLE `proc`;
+source include/search_pattern_in_file.inc;
+
+--remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20939.sql
+use test;
+
+
+--echo # End of 10.1 tests