mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
84e4e4506f
In Mariabackup, we would want the backed-up redo log file size to be a multiple of 512 bytes, or OS_FILE_LOG_BLOCK_SIZE. However, at startup, InnoDB would be picky, requiring the file size to be a multiple of innodb_page_size. Furthermore, InnoDB would require the parameter to be a multiple of one megabyte, while the minimum granularity is 512 bytes. Because the data-file-oriented fil_io() API is being used for writing the InnoDB redo log, writes will for now require innodb_log_file_size to be a multiple of the maximum innodb_page_size (65536 bytes). To complicate matters, InnoDB startup divided srv_log_file_size by UNIV_PAGE_SIZE, so that initially, the unit was bytes, and later it was innodb_page_size. We will simplify this and keep srv_log_file_size in bytes at all times. innobase_log_file_size: Remove. Remove some obsolete checks against overflow on 32-bit systems. srv_log_file_size is always 64 bits, and the maximum size 512GiB in multiples of innodb_page_size always fits in ulint (which is 32 or 64 bits). 512GiB would be 8,388,608*64KiB or 134,217,728*4KiB. log_init(): Remove the parameter file_size that was always passed as srv_log_file_size. log_set_capacity(): Add a parameter for passing the requested file size. srv_log_file_size_requested: Declare static in srv0start.cc. create_log_file(), create_log_files(), innobase_start_or_create_for_mysql(): Invoke fil_node_create() with srv_log_file_size expressed in multiples of innodb_page_size. innobase_start_or_create_for_mysql(): Require the redo log file sizes to be multiples of 512 bytes.
361 lines
7.9 KiB
Text
361 lines
7.9 KiB
Text
# Testcase for the following bugs
|
|
# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
|
|
# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
|
|
# Start mysqld without the possibility to create innodb_undo_tablespaces
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002'/ in mysqld.1.err
|
|
# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
|
|
# Start mysqld with non existent innodb_log_group_home_dir
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+/ in mysqld.1.err
|
|
# Remove ibdata1 & ibdata2
|
|
# Successfully let InnoDB create tablespaces
|
|
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine='innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
1
|
|
1
|
|
# Backup tmp/logfile/*
|
|
# 1. With ibdata2, Without ibdata1
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists/ 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_logfile1
|
|
ib_logfile2
|
|
ibdata2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 2. With ibdata1, without ibdata2
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /InnoDB: Tablespace size stored in header is \d+ pages, but the sum of data file sizes is \d+ pages/ in mysqld.1.err
|
|
FOUND 1 /InnoDB: Cannot start InnoDB. The tail of the system tablespace is missing/ 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_logfile1
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 3. Without ibdata1 & ibdata2
|
|
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
|
|
ib_logfile2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /InnoDB: undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ 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_logfile1
|
|
ib_logfile2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 4. Without ibdata*, ib_logfile* and with undo00*
|
|
bak_ib_logfile0
|
|
bak_ib_logfile1
|
|
bak_ib_logfile2
|
|
bak_ibdata1
|
|
bak_ibdata2
|
|
bak_undo001
|
|
bak_undo002
|
|
bak_undo003
|
|
ib_buffer_pool
|
|
undo001
|
|
undo002
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
bak_ib_logfile0
|
|
bak_ib_logfile1
|
|
bak_ib_logfile2
|
|
bak_ibdata1
|
|
bak_ibdata2
|
|
bak_undo001
|
|
bak_undo002
|
|
bak_undo003
|
|
ib_buffer_pool
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 5. Without ibdata*,ib_logfile* files & Without undo002
|
|
bak_ib_logfile0
|
|
bak_ib_logfile1
|
|
bak_ib_logfile2
|
|
bak_ibdata1
|
|
bak_ibdata2
|
|
bak_undo001
|
|
bak_undo002
|
|
bak_undo003
|
|
ib_buffer_pool
|
|
undo001
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
bak_ib_logfile0
|
|
bak_ib_logfile1
|
|
bak_ib_logfile2
|
|
bak_ibdata1
|
|
bak_ibdata2
|
|
bak_undo001
|
|
bak_undo002
|
|
bak_undo003
|
|
ib_buffer_pool
|
|
undo001
|
|
undo003
|
|
# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
|
|
bak_ib_logfile0
|
|
bak_ib_logfile1
|
|
bak_ib_logfile2
|
|
bak_ibdata1
|
|
bak_ibdata2
|
|
bak_undo001
|
|
bak_undo002
|
|
bak_undo003
|
|
ib_buffer_pool
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\./ 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
|
|
undo003
|
|
# 7. With ibdata files & Without undo002
|
|
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
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /InnoDB: Unable to open undo tablespace.*undo002/ 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_logfile1
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo003
|
|
# 8. With ibdata files & Without undo001, undo002
|
|
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
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo003
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
FOUND 1 /InnoDB: Unable to open undo tablespace.*undo001/ 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_logfile1
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo003
|
|
# 9. Without ibdata*, without undo*, Without ib_logfile1 and with 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_logfile2
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
NOT FOUND /redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\./ 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_logfile1
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 10. With ibdata*, without ib_logfile0
|
|
SELECT * FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine = 'innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
|
InnoDB YES Supports transactions, row-level locking, foreign keys and encryption for tables YES YES YES
|
|
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
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo002
|
|
undo003
|
|
# 11. With ibdata*, without ib_logfile1
|
|
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
|
|
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES
|
|
WHERE engine='innodb'
|
|
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
|
1
|
|
1
|
|
FOUND 1 /Resizing redo log from 1\*\d+ to 3\*\d+ bytes; LSN=\d+/ in mysqld.1.err
|
|
# Cleanup
|
|
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
|
|
ib_logfile2
|
|
ibdata1
|
|
ibdata2
|
|
undo001
|
|
undo002
|
|
undo003
|