mirror of
https://github.com/MariaDB/server.git
synced 2025-12-06 05:42:06 +03:00
InnoDB startup was discovering undo tablespaces in a dirty way. It was reading a possibly stale copy of the TRX_SYS page before processing any redo log records. srv_start(): Do not call buf_pool_invalidate(). Invoke trx_rseg_get_n_undo_tablespaces() after the recovery has been initiated. recv_recovery_from_checkpoint_start(): Assert that the buffer pool is empty. This used to be guaranteed by the buf_pool_invalidate() call. trx_rseg_get_n_undo_tablespaces(): Move to the calling compilation unit, and reimplement in a simpler way. srv_undo_tablespace_create(): Remove the constant parameter size=SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. srv_undo_tablespace_open(): Reimplement in a cleaner way, with more robust error handling. srv_all_undo_tablespaces_open(): Split from srv_undo_tablespaces_init(). srv_undo_tablespaces_init(): Read all "undo001","undo002" tablespace files directly, without consulting the TRX_SYS page via calling trx_rseg_get_n_undo_tablespaces(). This is joint work with Thirunarayanan Balathandayuthapani.
26 lines
730 B
Plaintext
26 lines
730 B
Plaintext
--source include/have_innodb.inc
|
|
--source include/have_debug.inc
|
|
|
|
--echo # Create 2 UNDO TABLESPACE(UNDO001(space_id =3), UNDO002(space_id =4))
|
|
|
|
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
|
|
CREATE TABLE t1(a varchar(60)) ENGINE INNODB;
|
|
start transaction;
|
|
INSERT INTO t1 VALUES(1);
|
|
|
|
--echo # xtrabackup backup
|
|
--disable_result_log
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
|
--enable_result_log
|
|
--echo # Display undo log files from target directory
|
|
list_files $basedir undo*;
|
|
|
|
--echo # xtrabackup prepare
|
|
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir;
|
|
--echo # Display undo log files from targer directory
|
|
list_files $basedir undo*;
|
|
|
|
DROP TABLE t1;
|
|
rmdir $basedir;
|