mirror of
https://github.com/MariaDB/server.git
synced 2025-09-22 00:55:30 +02:00

Fixed the following issues: - aria_read_index() and aria_read_data(), used by mariabackup, checked the wrong status from maria_page_crc_check(). - Both functions did infinite retries if crc did not match. - Wrong usage of ma_check_if_zero() in maria_page_crc_check() Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
83 lines
2.2 KiB
Text
83 lines
2.2 KiB
Text
--source include/have_debug.inc
|
|
--source include/have_aria.inc
|
|
|
|
SHOW VARIABLES LIKE 'aria_log_file_size';
|
|
|
|
--let $MYSQLD_DATADIR= `select @@datadir`
|
|
--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
|
|
mkdir $targetdir;
|
|
|
|
|
|
DELIMITER $$;
|
|
CREATE PROCEDURE display_aria_log_control(ctrl BLOB)
|
|
BEGIN
|
|
SELECT HEX(REVERSE(SUBSTRING(ctrl, 42, 4))) AS last_logno;
|
|
END;
|
|
$$
|
|
DELIMITER ;$$
|
|
|
|
DELIMITER $$;
|
|
CREATE PROCEDURE populate_t1()
|
|
BEGIN
|
|
FOR id IN 0..9 DO
|
|
INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024));
|
|
END FOR;
|
|
END;
|
|
$$
|
|
DELIMITER ;$$
|
|
|
|
|
|
CREATE TABLE test.t1(id INT, txt LONGTEXT) ENGINE=Aria;
|
|
|
|
--echo # MYSQLD_DATADIR/aria_log_control before --backup
|
|
--let ARIA_DATADIR=$MYSQLD_DATADIR
|
|
--source include/aria_log_control_load.inc
|
|
CALL display_aria_log_control(@aria_log_control);
|
|
|
|
let $backuplog= $MYSQLTEST_VARDIR/tmp/backup.log;
|
|
--echo # Running --backup
|
|
--let after_scanning_log_files=CALL test.populate_t1
|
|
--disable_result_log
|
|
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events > $backuplog
|
|
--let after_scanning_log_files=
|
|
--enable_result_log
|
|
|
|
--echo # MYSQLD_DATADIR/aria_log_control after --backup
|
|
--let ARIA_DATADIR=$MYSQLD_DATADIR
|
|
--source include/aria_log_control_load.inc
|
|
CALL display_aria_log_control(@aria_log_control);
|
|
|
|
--echo # targetdir/aria_log_control after --backup
|
|
--let ARIA_DATADIR=$targetdir
|
|
--source include/aria_log_control_load.inc
|
|
CALL display_aria_log_control(@aria_log_control);
|
|
|
|
|
|
--echo # Running --prepare
|
|
--disable_result_log
|
|
--exec $XTRABACKUP --prepare --target-dir=$targetdir
|
|
--enable_result_log
|
|
|
|
--echo # targetdir/aria_log_control after --prepare
|
|
--let ARIA_DATADIR=$targetdir
|
|
--source include/aria_log_control_load.inc
|
|
CALL display_aria_log_control(@aria_log_control);
|
|
|
|
|
|
--disable_result_log
|
|
--source include/restart_and_restore.inc
|
|
--enable_result_log
|
|
|
|
--echo # MYSQLD_DATADIR/aria_log_control after --copy-back
|
|
--let ARIA_DATADIR=$MYSQLD_DATADIR
|
|
--source include/aria_log_control_load.inc
|
|
CALL display_aria_log_control(@aria_log_control);
|
|
|
|
--echo # Checking that after --restore all t1 data is there
|
|
SELECT id, LENGTH(txt) FROM t1 ORDER BY id;
|
|
DROP TABLE t1;
|
|
rmdir $targetdir;
|
|
remove_file $backuplog;
|
|
|
|
DROP PROCEDURE populate_t1;
|
|
DROP PROCEDURE display_aria_log_control;
|