1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-29986 Set innodb_undo_tablespaces=3 by default

Starting with commit baf276e6d4 (MDEV-19229)
the parameter innodb_undo_tablespaces can be increased from its
previous default value 0 while allowing an upgrade from old databases.

We will change the default setting to innodb_undo_tablespaces=3
so that the space occupied by possible bursts of undo log records
can be reclaimed after SET GLOBAL innodb_undo_log_truncate=ON.

We will not enable innodb_undo_log_truncate by default, because it
causes some observable performance degradation.

Special thanks to Thirunarayanan Balathandayuthapani for diagnosing
and fixing a number of bugs related to this new default setting.

Tested by: Matthias Leich, Axel Schwenke, Vladislav Vaintroub
(with both values of innodb_undo_log_truncate)
This commit is contained in:
Marko Mäkelä
2023-01-13 12:46:30 +02:00
parent d6d85c92ee
commit 44dce3b207
11 changed files with 30 additions and 11 deletions

View File

@@ -10,10 +10,20 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
--let $MYSQLD_DATADIR=`SELECT @@datadir`
--let $DATA= $MYSQLD_DATADIR/ibdata1
--let $DATACOPY=$MYSQLTEST_VARDIR/tmp/ibdata1
--let $UNDO_1= $MYSQLD_DATADIR/undo001
--let $UNDO_2= $MYSQLD_DATADIR/undo002
--let $UNDO_3= $MYSQLD_DATADIR/undo003
--let $UNDO_1_COPY=$MYSQLTEST_VARDIR/tmp/undo001
--let $UNDO_2_COPY=$MYSQLTEST_VARDIR/tmp/undo002
--let $UNDO_3_COPY=$MYSQLTEST_VARDIR/tmp/undo003
CREATE TABLE t(a INT) ENGINE=InnoDB;
--source include/kill_mysqld.inc
# Move the file to cause srv_init_abort_low() call from srv_start()
--move_file $DATA $DATACOPY
--move_file $UNDO_1 $UNDO_1_COPY
--move_file $UNDO_2 $UNDO_2_COPY
--move_file $UNDO_3 $UNDO_3_COPY
# If the bug is not fixed, the server will hang here. Note that the test is
# unstable because the condition
@@ -28,5 +38,8 @@ CREATE TABLE t(a INT) ENGINE=InnoDB;
SELECT * FROM t;
--source include/kill_mysqld.inc
--move_file $DATACOPY $DATA
--move_file $UNDO_1_COPY $UNDO_1
--move_file $UNDO_2_COPY $UNDO_2
--move_file $UNDO_3_COPY $UNDO_3
--source include/start_mysqld.inc
DROP TABLE t;