summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-14 11:13:24 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-15 08:07:20 +0200
commit743ac7c2d0f7c27699d53f35137e02ee3cfd4b71 (patch)
tree7e1108eba584630112e0279258c032dc104622b1 /mysql-test
parent3d85292afd7f332155b2c574b642490fd026b3ba (diff)
downloadmariadb-git-743ac7c2d0f7c27699d53f35137e02ee3cfd4b71.tar.gz
MDEV-12061 Allow innodb_log_files_in_group=1
The InnoDB redo log consists of a list of files that logically form a bigger file, as if the individual files were concatenated together. The first file will always be written on redo log checkpoint, because the two checkpoint pages are at the start of the single logical redo log file. There is no technical reason why InnoDB requires at least 2 files to exist. Let us reduce the minimum number to 1. In that way, restoring from backups will become easier, since InnoDB can directly deal with a single backed-up redo log file.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb/r/log_file.result40
-rw-r--r--mysql-test/suite/innodb/r/log_file_size.result2
-rw-r--r--mysql-test/suite/innodb/t/log_file.test16
-rw-r--r--mysql-test/suite/innodb/t/log_file_size.test12
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result2
5 files changed, 5 insertions, 67 deletions
diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result
index b0351232ed9..0003f7d3c3a 100644
--- a/mysql-test/suite/innodb/r/log_file.result
+++ b/mysql-test/suite/innodb/r/log_file.result
@@ -335,50 +335,12 @@ ibdata2
undo001
undo002
undo003
-SELECT * FROM INFORMATION_SCHEMA.ENGINES
-WHERE engine = 'innodb'
-AND support IN ('YES', 'DEFAULT', 'ENABLED');
-ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND /Only one log file found/ in mysqld.1.err
-bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
-bak_ibdata1
-bak_ibdata2
-bak_undo001
-bak_undo002
-bak_undo003
-ib_buffer_pool
-ib_logfile0
-ib_logfile2
-ibdata1
-ibdata2
-undo001
-undo002
-undo003
-# 12. With ibdata*, without ib_logfile2
-bak_ib_logfile0
-bak_ib_logfile1
-bak_ib_logfile2
-bak_ibdata1
-bak_ibdata2
-bak_undo001
-bak_undo002
-bak_undo003
-ib_buffer_pool
-ib_logfile0
-ib_logfile1
-ibdata1
-ibdata2
-undo001
-undo002
-undo003
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
1
-FOUND /Resizing redo log from 2\*\d+ to 3\*\d+ pages, LSN=\d+/ in mysqld.1.err
+FOUND /Resizing redo log from 1\*\d+ to 3\*\d+ pages, LSN=\d+/ in mysqld.1.err
# Cleanup
bak_ib_logfile0
bak_ib_logfile1
diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result
index 3f8f99fe8c7..e07dba67a7b 100644
--- a/mysql-test/suite/innodb/r/log_file_size.result
+++ b/mysql-test/suite/innodb/r/log_file_size.result
@@ -53,8 +53,6 @@ ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
-ERROR 42000: Unknown storage engine 'InnoDB'
-SELECT * FROM t1;
a
42
123
diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test
index f7a8ef36cc0..0bb8ee8845c 100644
--- a/mysql-test/suite/innodb/t/log_file.test
+++ b/mysql-test/suite/innodb/t/log_file.test
@@ -26,7 +26,7 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/log_file;
--mkdir $bugdir
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
-let SEARCH_RANGE = -50000;
+let SEARCH_RANGE = -100000;
let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
@@ -217,21 +217,9 @@ eval $check_no_innodb;
--remove_file $bugdir/ib_logfile1
--list_files $bugdir
--source include/start_mysqld.inc
-eval $check_no_innodb;
---source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=Only one log file found;
---source include/search_pattern_in_file.inc
-
-# clean up & Restore
---source ../include/log_file_cleanup.inc
-
---echo # 12. With ibdata*, without ib_logfile2
---remove_file $bugdir/ib_logfile2
---list_files $bugdir
---source include/start_mysqld.inc
eval $check_yes_innodb;
--source include/shutdown_mysqld.inc
-let SEARCH_PATTERN=Resizing redo log from 2\*\d+ to 3\*\d+ pages, LSN=\d+;
+--let SEARCH_PATTERN=Resizing redo log from 1\*\d+ to 3\*\d+ pages, LSN=\d+
--source include/search_pattern_in_file.inc
--let $restart_parameters=
diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test
index 25988fc6fd8..179472a45a1 100644
--- a/mysql-test/suite/innodb/t/log_file_size.test
+++ b/mysql-test/suite/innodb/t/log_file_size.test
@@ -163,25 +163,15 @@ let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
# We should have perfectly synced files here.
# Rename the log files, and trigger an error in recovery.
---move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
---let $restart_parameters=
---source include/start_mysqld.inc
---error ER_UNKNOWN_STORAGE_ENGINE
-SELECT * FROM t1;
-
-let SEARCH_PATTERN= InnoDB: Only one log file found;
---source include/search_pattern_in_file.inc
---move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
-
perl;
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
print FILE "garbage";
close(FILE);
EOF
---source include/restart_mysqld.inc
+--source include/start_mysqld.inc
--error ER_UNKNOWN_STORAGE_ENGINE
SELECT * FROM t1;
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 74d5abaf1d4..9394692b526 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -1470,7 +1470,7 @@ DEFAULT_VALUE 2
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.
-NUMERIC_MIN_VALUE 2
+NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL