1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Adapt the innodb_undo tests from MySQL 5.7

Simplify the tests that are present in MySQL 5.7. Make the table
smaller while generating enough undo log. Do not unnecessarily
drop tables.

trx_purge_initiate_truncate(): Remove two crash injection points
(before and after normal redo log checkpoint), because they are
not adding any value. Clarify some messages.

trx_sys_create_rsegs(): Display the number of active undo tablespaces.

srv_undo_tablespaces_init(): When initializing the data files, do not
leave srv_undo_tablespaces_active at 0.
Do not display that number; let trx_sys_create_rsegs() display it once
the final number is known.

innodb_params_adjust(): Adjust parameters after startup.

innobase_init(): Do not allow innodb_max_undo_size to be less
than SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. This avoids unnecessary
repeated truncation of undo tablespaces when using
innodb_page_size=32k or innodb_page_size=64k.
This commit is contained in:
Marko Mäkelä
2017-04-25 09:26:01 +03:00
parent d1bcc1f49f
commit ce3ffefc45
16 changed files with 363 additions and 83 deletions

View File

@@ -4,17 +4,21 @@ COUNT(@@GLOBAL.innodb_max_undo_log_size)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @save = @@GLOBAL.innodb_max_undo_log_size;
SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
COUNT(@@GLOBAL.innodb_max_undo_log_size)
1
1 Expected
SET @@GLOBAL.innodb_max_undo_log_size=18446744073709551615;
SELECT @@GLOBAL.innodb_max_undo_log_size;
@@GLOBAL.innodb_max_undo_log_size
18446744073709551615
18446744073709551615 Expected
Warnings:
Warning 1292 Truncated incorrect innodb_max_undo_log_size value: '18446744073709551615'
SELECT FLOOR(@@GLOBAL.innodb_max_undo_log_size / @@GLOBAL.innodb_page_size);
FLOOR(@@GLOBAL.innodb_max_undo_log_size / @@GLOBAL.innodb_page_size)
4294967296
4294967296 Expected
SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
SET GLOBAL innodb_max_undo_log_size = @save;
'#---------------------BS_STVARS_035_03----------------------#'
SELECT @@GLOBAL.innodb_max_undo_log_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES

View File

@@ -1618,14 +1618,14 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_UNDO_LOG_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1073741824
GLOBAL_VALUE 10485760
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1073741824
DEFAULT_VALUE 10485760
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum size of UNDO tablespace in MB (If UNDO tablespace grows beyond this size it will be truncated in due course).
VARIABLE_COMMENT Desired maximum UNDO tablespace size in bytes
NUMERIC_MIN_VALUE 10485760
NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_MAX_VALUE 281474976710656
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO