mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Now there can be only one log file instead of several which logically work as a single file. Possible names of redo log files: ib_logfile0, ib_logfile101 (for just created one) innodb_log_fiels_in_group: value of this variable is not used by InnoDB. Possible values are still 1..100, to not break upgrade LOG_FILE_NAME: add constant of value "ib_logfile0" LOG_FILE_NAME_PREFIX: add constant of value "ib_logfile" get_log_file_path(): convenience function that returns full path of a redo log file SRV_N_LOG_FILES_MAX: removed srv_n_log_files: we can't remove this for compatibility reasons, but now server doesn't use this variable log_sys_t::file::fd: now just one, not std::vector log_sys_t::log_capacity: removed word 'group' find_and_check_log_file(): part of logic from huge srv_start() moved here recv_sys_t::files: file descriptors of redo log files. There can be several of those in case we're upgrading from older MariaDB version. recv_sys_t::remove_extra_log_files: whether to remove ib_logfile{1,2,3...} after successfull upgrade. recv_sys_t::read(): open if needed and read from one of several log files recv_sys_t::files_size(): open if needed and return files count redo_file_sizes_are_correct(): check that redo log files sizes are equal. Just to log an error for a user. Corresponding check was moved from srv0start.cc namespace deprecated: put all deprecated variables here to prevent usage of it by us, developers
96 lines
3.2 KiB
Plaintext
96 lines
3.2 KiB
Plaintext
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
|
# 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=20M
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (42);
|
|
# restart: --innodb-log-file-size=12M
|
|
SELECT * FROM t1;
|
|
a
|
|
INSERT INTO t1 VALUES (42);
|
|
BEGIN;
|
|
DELETE FROM t1;
|
|
# restart: --innodb-log-file-size=5M
|
|
SELECT * FROM t1;
|
|
a
|
|
42
|
|
INSERT INTO t1 VALUES (0),(123);
|
|
BEGIN;
|
|
DELETE FROM t1 WHERE a>0;
|
|
# Persist the state of the above incomplete transaction by
|
|
# causing a redo log write for another transaction.
|
|
connect con1, localhost, root;
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
DELETE FROM t1 WHERE a=0;
|
|
disconnect con1;
|
|
connection default;
|
|
# Kill the server
|
|
# restart: --innodb-log-group-home-dir=foo\;bar
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_1
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Starting crash recovery from checkpoint LSN=.*/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_3
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
# restart: --innodb-read-only
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
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 5 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_5
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 6 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
|
|
# restart: --innodb-read-only
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
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 7 /redo log from [0-9]+ to [0-9]+ bytes/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_7
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
# restart: --innodb-read-only
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Cannot create log file in read-only mode/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_8
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_9
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_9
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of 512 bytes/ in mysqld.1.err
|
|
# restart: --debug=d,innodb_log_abort_9
|
|
SELECT * FROM t1;
|
|
a
|
|
42
|
|
123
|
|
# restart: --debug=d,innodb_log_abort_10
|
|
SELECT * FROM t1;
|
|
ERROR 42000: Unknown storage engine 'InnoDB'
|
|
FOUND 1 /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
|
FOUND 1 /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err
|
|
# restart
|
|
SELECT * FROM t1;
|
|
a
|
|
42
|
|
123
|
|
DROP TABLE t1;
|