mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
947efe17ed
This is based on a prototype by Thirunarayanan Balathandayuthapani <thiru@mariadb.com>. Binlog and Galera write-set replication information was written into TRX_SYS page on each commit. Instead of writing to the TRX_SYS during normal operation, InnoDB can make use of rollback segment header pages, which are already being written to during a commit. The following list of fields in rollback segment header page are added: TRX_RSEG_BINLOG_OFFSET TRX_RSEG_BINLOG_NAME (NUL-terminated; empty name = not present) TRX_RSEG_WSREP_XID_FORMAT (0=not present; 1=present) TRX_RSEG_WSREP_XID_GTRID TRX_RSEG_WSREP_XID_BQUAL TRX_RSEG_WSREP_XID_DATA trx_sys_t: Introduce the fields recovered_binlog_filename, recovered_binlog_offset, recovered_wsrep_xid. To facilitate upgrade from older mysql or mariaDB versions, we will read the information in TRX_SYS page. It will be overridden by the information that we find in rollback segment header pages. Mariabackup --prepare will read the metadata from the rollback segment header pages via trx_rseg_array_init(). It will still not read any undo log pages or recover any transactions.
25 lines
648 B
Text
25 lines
648 B
Text
--source include/have_innodb.inc
|
|
--source include/have_log_bin.inc
|
|
|
|
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
|
|
CREATE TABLE t(a varchar(60)) ENGINE INNODB;
|
|
INSERT INTO t VALUES(1);
|
|
|
|
SHOW VARIABLES like 'log_bin';
|
|
|
|
--disable_result_log
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
|
--enable_result_log
|
|
|
|
exec $XTRABACKUP --prepare --binlog-info=1 --apply-log-only --target-dir=$basedir ;
|
|
|
|
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/current_test;
|
|
--let SEARCH_PATTERN= Last binlog file .*, position .*
|
|
--source include/search_pattern_in_file.inc
|
|
--echo # expect FOUND
|
|
|
|
DROP TABLE t;
|
|
|
|
# Cleanup
|
|
rmdir $basedir;
|