Commit 3a3c8337 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-33188 Add option --dir to mariadb-dump

New option works just like --tab, w.r.t output (sql file for table definition
and tab-separated for data).

Compared to --tab it allows --databases and --all-databases.
When --dir is used , it creates directory structure in the output directory,
pointed to by --dir. For every database to be dumped, there will be a directory
with database name.

All options that --tab supports, are also supported by --dir, in particular
--parallel
parent 929c2e06
This diff is collapsed.
......@@ -6663,7 +6663,7 @@ drop table t1;
#
# End of 10.4 tests
#
mariadb-dump: --xml can't be used with --tab.
mariadb-dump: --xml can't be used with --tab or --dir.
select @@max_connections into @save_max_connections;
set global max_connections=10;
mariadb-dump: Got error: 2002: "Received error packet before completion of TLS handshake. The authenticity of the following error cannot be verified: 1040 - Too many connections" when trying to connect
......@@ -6673,3 +6673,8 @@ set global max_connections=@save_max_connections;
#
# End of 11.4 tests
#
# Content of dump directory
mtr
mysql
test
# Content of 'test' dump subdirectory
......@@ -3044,3 +3044,13 @@ set global max_connections=@save_max_connections;
--echo #
--echo # End of 11.4 tests
--echo #
#
# MDEV-33188 Add option --dir to mariadb-dump
#
--mkdir $MYSQLTEST_VARDIR/tmp/dump
--exec $MYSQL_DUMP --dir=$MYSQLTEST_VARDIR/tmp/dump --all-databases --parallel=10
--echo # Content of dump directory
--list_files $MYSQLTEST_VARDIR/tmp/dump
--echo # Content of 'test' dump subdirectory
--list_files $MYSQLTEST_VARDIR/tmp/dump/test
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment