mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-20907 Set innodb_log_files_in_group=1 by default
Historically, InnoDB split the redo log into at least 2 files. MDEV-12061 allowed the minimum to be innodb_log_files_in_group=1, but it kept the default at innodb_log_files_in_group=2. Because performance seems to be slightly better with only one log file, and because implementing an append-only variant of the log would require a single file, let us define the default to be 1, and have innodb_log_file_size=96M, to retain the same default total size.
This commit is contained in:
@@ -21,7 +21,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10\.2\.2, and it appears corrupted/ in mysqld.1.err
|
||||
# empty redo log from before MariaDB 10.2.2
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -130,7 +130,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 2 /InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42/ in mysqld.1.err
|
||||
# Empty 10.3 redo log
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -138,7 +138,7 @@ COUNT(*)
|
||||
1
|
||||
FOUND 1 /InnoDB: .* started; log sequence number 121397[09]/ in mysqld.1.err
|
||||
# Empty 10.2 redo log
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=1m
|
||||
# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_corruption --innodb-force-recovery=5 --innodb-log-file-size=2m
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
@@ -155,6 +155,5 @@ FOUND 1 /InnoDB: Obtaining redo log encryption key version 1 failed/ in mysqld.1
|
||||
FOUND 1 /InnoDB: Decrypting checkpoint failed/ in mysqld.1.err
|
||||
ib_buffer_pool
|
||||
ib_logfile0
|
||||
ib_logfile1
|
||||
ibdata1
|
||||
# restart
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# Kill the server
|
||||
# restart: --debug=d,innodb_log_abort_1 --innodb-log-files-in-group=1 --innodb-log-file-size=4M
|
||||
# restart: --debug=d,innodb_log_abort_1 --innodb-log-files-in-group=2 --innodb-log-file-size=4M
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either/ in mysqld.1.err
|
||||
# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=1 --innodb-log-file-size=4M
|
||||
# restart: --debug=d,innodb_log_abort_3,ib_log --innodb-log-files-in-group=2 --innodb-log-file-size=4M
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 1 /srv_prepare_to_delete_redo_log_files: ib_log: MLOG_CHECKPOINT.* written/ in mysqld.1.err
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
|
||||
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=2m
|
||||
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err
|
||||
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
|
||||
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
||||
NOT FOUND /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err
|
||||
# restart: --innodb-thread-concurrency=1 --innodb-log-file-size=2m
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
|
||||
# restart: --innodb-thread-concurrency=100 --innodb-log-file-size=20M
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (42);
|
||||
# restart: --innodb-log-file-size=6M
|
||||
# restart: --innodb-log-file-size=12M
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
INSERT INTO t1 VALUES (42);
|
||||
@@ -51,11 +52,11 @@ FOUND 1 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
# restart: --debug=d,innodb_log_abort_4
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 2 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
FOUND 2 /redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes/ in mysqld.1.err
|
||||
# restart: --debug=d,innodb_log_abort_5
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 3 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
FOUND 3 /redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes/ in mysqld.1.err
|
||||
# restart: --innodb-read-only
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
@@ -63,7 +64,7 @@ FOUND 2 /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
# restart: --debug=d,innodb_log_abort_6
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND 4 /redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes/ in mysqld.1.err
|
||||
FOUND 4 /redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes/ in mysqld.1.err
|
||||
# restart: --debug=d,innodb_log_abort_7
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
|
||||
@@ -80,6 +80,5 @@ FOUND 50 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contain
|
||||
# restart
|
||||
ib_buffer_pool
|
||||
ib_logfile0
|
||||
ib_logfile1
|
||||
ibdata1
|
||||
db.opt
|
||||
|
||||
@@ -193,7 +193,6 @@ a
|
||||
DROP TABLE tr,tc,td,tz,tp;
|
||||
# restart
|
||||
ib_logfile0
|
||||
ib_logfile1
|
||||
ibdata1
|
||||
sys_tables.bin
|
||||
call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
|
||||
|
||||
Reference in New Issue
Block a user