mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-32250 Enable --no-autocommit by default in mysqldump
- mariadb-dump utility performs logical backups by producing set of sql statements that can be executed. By enabling this no-autocommit option, InnoDB can load the data in an efficient way and writes the only one undo log for the whole operation. Only first insert statement undergoes bulk insert operation, remaining insert statement doesn't write undo log and undergoes normal insert code path.
This commit is contained in:
@ -12,15 +12,15 @@ 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
|
||||
--exec $MYSQL_DUMP --no-autocommit=0 --compact test
|
||||
--echo # dump by tables order 1
|
||||
--exec $MYSQL_DUMP --compact --tables test t1 a1 x1
|
||||
--exec $MYSQL_DUMP --no-autocommit=0 --compact --tables test t1 a1 x1
|
||||
--echo # dump by tables order 2
|
||||
--exec $MYSQL_DUMP --compact --tables test a1 t1 x1
|
||||
--exec $MYSQL_DUMP --no-autocommit=0 --compact --tables test a1 t1 x1
|
||||
--echo # dump by tables only tables
|
||||
--exec $MYSQL_DUMP --compact --tables test t1
|
||||
--exec $MYSQL_DUMP --no-autocommit=0 --compact --tables test t1
|
||||
--echo # dump by tables only sequences
|
||||
--exec $MYSQL_DUMP --compact --tables test a1 x1
|
||||
--exec $MYSQL_DUMP --no-autocommit=0 --compact --tables test a1 x1
|
||||
--echo # end of dumps
|
||||
|
||||
DROP TABLE a1,t1,x1;
|
||||
|
Reference in New Issue
Block a user