diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-19 15:02:09 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-03-25 13:24:02 +0100 |
commit | 7b9545073fc94aa66beb21cb66eab85cdde92a55 (patch) | |
tree | e9f684f1bd48a9b1e6bf4d154ea76743a235a505 /mysql-test/t/mysqldump.test | |
parent | 5c1ed707a3d03a081fde2b2c960998d797757adf (diff) | |
download | mariadb-git-bb-10.1-MDEV-22037.tar.gz |
MDEV-22037: Add ability to skip content of some tables (work around for MDEV-20939)bb-10.1-MDEV-22037
--ignore-table-data parameter added.
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r-- | mysql-test/t/mysqldump.test | 36 |
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 |