Commit 613e9e7d authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 3043f384
# Copyright (c) 2007, 2013, Oracle and/or its affiliates
# Copyright (c) 2010, 2013, Monty Program Ab
# Copyright (c) 2010, 2019, MariaDB Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -53,8 +53,8 @@ loose-innodb_lru_scan_depth= 100
loose-innodb_write_io_threads= 2
loose-innodb_read_io_threads= 2
loose-innodb_log_buffer_size= 1M
loose-innodb_log_file_size= 5M
loose-innodb_log_files_in_group= 2
loose-innodb_log_file_size= 10M
loose-innodb_log_files_in_group= 1
loose-innodb-stats-persistent= OFF
slave-net-timeout=120
......
......@@ -3348,7 +3348,7 @@ sub mysql_install_db {
mtr_add_arg($args, "--loose-skip-plugin-$_") for @optional_plugins;
# starting from 10.0 bootstrap scripts require InnoDB
mtr_add_arg($args, "--loose-innodb");
mtr_add_arg($args, "--loose-innodb-log-file-size=5M");
mtr_add_arg($args, "--loose-innodb-log-file-size=10M");
mtr_add_arg($args, "--disable-sync-frm");
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
mtr_add_arg($args, "--core-file");
......
......@@ -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');
......@@ -151,9 +151,8 @@ SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err
NOT FOUND /InnoDB: Encrypting redo log/ in mysqld.1.err
# restart
ib_buffer_pool
ib_logfile0
ib_logfile1
ibdata1
......@@ -9,7 +9,6 @@ let $datadir=`select @@datadir`;
--source include/shutdown_mysqld.inc
--remove_file $datadir/ib_logfile0
--remove_file $datadir/ib_logfile1
--remove_file $datadir/ibdata1
--source include/start_mysqld.inc
......
......@@ -2,7 +2,7 @@
[mysqld.1]
max_allowed_packet=10M
innodb_log_file_size=110M
innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;gcache.size=10M'
[mysqld.2]
......
!include ../galera_2nodes.cnf
[mysqld.1]
innodb_log_file_size=110M
innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
[mysqld.2]
innodb_log_file_size=110M
innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
--innodb_log_file_size=1G --binlog-row-event-max-size=100M
--innodb_log_file_size=2G --binlog-row-event-max-size=100M
......@@ -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
......
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`");
......
......@@ -458,5 +458,4 @@ eval $check_no_innodb;
--remove_file $bugdir/ibdata1
--remove_file $bugdir/ibdata2
--remove_file $bugdir/ib_logfile0
--remove_file $bugdir/ib_logfile1
--rmdir $bugdir
......@@ -90,12 +90,6 @@ print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
print OUT chr(0) x (759 * 16384);
close OUT or die;
# Create a dummy second redo log file
die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
binmode OUT;
print OUT chr(0) x 1048576;
close OUT or die;
# Create a redo log from before MariaDB 10.2.2/MySQL 5.7.9
die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
......@@ -104,7 +98,7 @@ print OUT pack("x[13]nCNnxxNNx[256]", 0x1286, 12, 0x80c, 0xf0, ~0, ~0);
print OUT pack("H*x[1240]", "590DBAACFE922582");
print OUT pack("H*x[5]", "800009440022000c0000000138");
print OUT pack("H*x[475]H*", "12860cb7809781e80006626f677573", "089C0ADA");
print OUT chr(0) x 1046016;
print OUT chr(0) x 2094592;
close OUT or die;
EOF
......@@ -119,7 +113,13 @@ let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log
--echo # redo log from before MariaDB 10.2.2, with corrupted log checkpoint
--move_file $bugdir/ib_logfile0 $bugdir/ib_logfile
--copy_file $bugdir/ib_logfile1 $bugdir/ib_logfile0
perl;
# Create a dummy second redo log file
die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
binmode OUT;
print OUT chr(0) x 1048576;
close OUT or die;
EOF
--source include/start_mysqld.inc
eval $check_no_innodb;
--source include/shutdown_mysqld.inc
......@@ -154,7 +154,7 @@ die unless seek(OUT, 0x800, 0);
print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 0, 0xb2a);
close OUT or die;
EOF
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
......@@ -415,7 +415,7 @@ print OUT pack("NnnNx[496]N", 0x80000944, 12, 12, 1, 0x46c8a2a2);
close OUT or die;
EOF
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=1m
--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=2m
--source include/start_mysqld.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
......
......@@ -37,7 +37,7 @@ let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
--let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=1m --innodb-log-files-in-group=2
--let $restart_parameters= --innodb-thread-concurrency=1 --innodb-log-file-size=2m
--source include/start_mysqld.inc
eval $check_no_innodb;
......@@ -50,13 +50,13 @@ let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size .* bytes
--source include/start_mysqld.inc
CHECK TABLE t1;
--let $restart_parameters= --innodb-thread-concurrency=100 --innodb-log-file-size=10M --innodb-log-files-in-group=2
--let $restart_parameters= --innodb-thread-concurrency=100 --innodb-log-file-size=20M
--source include/restart_mysqld.inc
BEGIN;
INSERT INTO t1 VALUES (42);
let $restart_parameters = --innodb-log-file-size=6M;
let $restart_parameters = --innodb-log-file-size=12M;
let $shutdown_timeout=0;
--source include/restart_mysqld.inc
......@@ -120,14 +120,14 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_5
--source include/restart_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --innodb-read-only
......@@ -142,7 +142,7 @@ let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 2\*[0-9]+ bytes;
let SEARCH_PATTERN= redo log from 3\*[0-9]+ to 1\*[0-9]+ bytes;
--source include/search_pattern_in_file.inc
--let $restart_parameters= --debug=d,innodb_log_abort_7
......@@ -178,8 +178,7 @@ let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
--source include/shutdown_mysqld.inc
# We should have perfectly synced files here.
# Rename the log files, and trigger an error in recovery.
--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
# Trigger an error in recovery.
perl;
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
......@@ -209,7 +208,6 @@ let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576
--source include/search_pattern_in_file.inc
--remove_file $MYSQLD_DATADIR/ib_logfile1
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
--let $restart_parameters= --debug=d,innodb_log_abort_10
--source include/restart_mysqld.inc
......
......@@ -1223,7 +1223,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILES_IN_GROUP
SESSION_VALUE NULL
DEFAULT_VALUE 2
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
......@@ -1235,7 +1235,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_FILE_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 50331648
DEFAULT_VALUE 100663296
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Size of each log file in a log group.
......@@ -1682,7 +1682,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable background redo log (ib_logfile0, ib_logfile1...) scrubbing
VARIABLE_COMMENT Enable background redo log scrubbing
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......
......@@ -82,7 +82,7 @@ SELECT @@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio;
--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
# Check if innodb_use_native_aio can be accessed with and without @@ sign #
################################################################################
SELECT COUNT(@@innodb_use_native_aio);
......
......@@ -6,9 +6,9 @@ machine="Linux-x64"
# InnoDB tests
./run-all-tests --suffix=-innodb --comments="Engine=InnoDB --innodb_buffer_pool_size=256M --innodb_log_file_size=1000M --innodb_log_buffer_size=16M --innodb_lock_wait_timeout=50 --innodb_flush_log_at_trx_commit=1 --innodb_flush_method=O_DIRECT --innodb_log_files_in_group=2 --skip-innodb-doublewrite" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --log
./run-all-tests --suffix=-innodb --comments="Engine=InnoDB --innodb_buffer_pool_size=256M --innodb_log_file_size=2000M --innodb_log_buffer_size=16M --innodb_lock_wait_timeout=50 --innodb_flush_log_at_trx_commit=1 --innodb_flush_method=O_DIRECT --innodb_log_files_in_group=1 --skip-innodb-doublewrite" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --log
./run-all-tests --suffix=_fast-innodb --comments="Engine=InnoDB --innodb_buffer_pool_size=256M --innodb_log_file_size=1000M --innodb_log_buffer_size=16M --innodb_lock_wait_timeout=50 --innodb_flush_log_at_trx_commit=1 --innodb_flush_method=O_DIRECT --innodb_log_files_in_group=2 --skip-innodb-doublewrite" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log
./run-all-tests --suffix=_fast-innodb --comments="Engine=InnoDB --innodb_buffer_pool_size=256M --innodb_log_file_size=2000M --innodb_log_buffer_size=16M --innodb_lock_wait_timeout=50 --innodb_flush_log_at_trx_commit=1 --innodb_flush_method=O_DIRECT --innodb_log_files_in_group=1 --skip-innodb-doublewrite" --create-options="ENGINE=InnoDB" --hw="$hw" --optimization="$optimization" --machine="$machine" --fast --log
# MyISAM tests
......
......@@ -19089,14 +19089,14 @@ static MYSQL_SYSVAR_ULONG(log_buffer_size, srv_log_buffer_size,
static MYSQL_SYSVAR_ULONGLONG(log_file_size, srv_log_file_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Size of each log file in a log group.",
NULL, NULL, 48 << 20, 1 << 20, log_group_max_size, UNIV_PAGE_SIZE_MAX);
NULL, NULL, 96 << 20, 1 << 20, log_group_max_size, UNIV_PAGE_SIZE_MAX);
/* OS_FILE_LOG_BLOCK_SIZE would be more appropriate than UNIV_PAGE_SIZE_MAX,
but fil_space_t is being used for the redo log, and it uses data pages. */
static MYSQL_SYSVAR_ULONG(log_files_in_group, srv_n_log_files,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of log files in the log group. InnoDB writes to the files in a circular fashion.",
NULL, NULL, 2, 1, SRV_N_LOG_FILES_MAX, 0);
NULL, NULL, 1, 1, SRV_N_LOG_FILES_MAX, 0);
static MYSQL_SYSVAR_ULONG(log_write_ahead_size, srv_log_write_ahead_size,
PLUGIN_VAR_RQCMDARG,
......@@ -19530,7 +19530,7 @@ static MYSQL_SYSVAR_UINT(encryption_rotation_iops, srv_n_fil_crypt_iops,
static MYSQL_SYSVAR_BOOL(scrub_log, srv_scrub_log,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"Enable background redo log (ib_logfile0, ib_logfile1...) scrubbing",
"Enable background redo log scrubbing",
0, 0, 0);
static MYSQL_SYSVAR_ULONGLONG(scrub_log_speed, innodb_scrub_log_speed,
......
--innodb_log_file_size=100M
--innodb_log_file_size=200M
--innodb_log_file_size=100M
--innodb_log_file_size=200M
--innodb_log_file_size=100M
--innodb_log_file_size=200M
......@@ -717,12 +717,12 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall)
/*
Sets Innodb buffer pool size (1/8 of RAM by default), if not already specified
via command line.
Calculates innodb log file size as min(50, innodb buffer pool size/8)
Calculates innodb log file size as min(100, innodb buffer pool size/4)
*/
extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
{
unsigned long long InnodbBufferPoolSize= 256;
unsigned long long InnodbLogFileSize= 50;
unsigned long long InnodbLogFileSize= 100;
wchar_t buff[MAX_PATH];
UINT er = ERROR_SUCCESS;
HRESULT hr= S_OK;
......@@ -765,7 +765,7 @@ extern "C" UINT __stdcall PresetDatabaseProperties(MSIHANDLE hInstall)
swprintf_s(buff, L"%llu",InnodbBufferPoolSize);
MsiSetPropertyW(hInstall, L"BUFFERPOOLSIZE", buff);
}
InnodbLogFileSize = min(50, InnodbBufferPoolSize);
InnodbLogFileSize = min(100, 2 * InnodbBufferPoolSize);
swprintf_s(buff, L"%llu",InnodbLogFileSize);
MsiSetPropertyW(hInstall, L"LOGFILESIZE", buff);
......
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