Skip to content
Permalink
Browse files
Reduce a test so that it fails less frequently on buildbot
There is an inherent race condition between Mariabackup and the
MariaDB server when the InnoDB redo log is being copied. It is
possible that the tail of the circular redo log is overwriting
the head of the log before Mariabackup gets a chance to read it.
So, we reduce the test to generate less redo log. Also, enable
the test on all supported innodb_page_size.
  • Loading branch information
dr-m committed Jul 6, 2017
1 parent d902d43 commit c89c494
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 34 deletions.
@@ -1,16 +1,6 @@
CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1)) ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;
CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
BEGIN
DECLARE CURRENT_NUM INT;
SET CURRENT_NUM = 0;
WHILE CURRENT_NUM < REPEAT_COUNT DO
INSERT INTO t1 VALUES(CURRENT_NUM, concat(uuid(), CURRENT_NUM, repeat('ab', floor(rand()*100) ), uuid()));
SET CURRENT_NUM = CURRENT_NUM + 1;
END WHILE;
END//
COMMIT;
SET AUTOCOMMIT=0;
CALL innodb_insert_proc(50000);
CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1))
ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;
BEGIN;
COMMIT;
# xtrabackup backup
drop table t1;
@@ -20,6 +10,5 @@ drop table t1;
# restart server
select sum(c1) from t1;
sum(c1)
1249975000
12497500
DROP TABLE t1;
drop procedure innodb_insert_proc;
@@ -1,26 +1,22 @@
#--source include/innodb_page_size_small.inc
--source include/innodb_page_size_small.inc
--source include/have_file_key_management.inc

CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1)) ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;
CREATE TABLE t1(c1 INT, b VARCHAR(2400), index(b(100),c1))
ENGINE=INNODB ROW_FORMAT=compressed ENCRYPTED=YES;

DELIMITER //;
CREATE PROCEDURE innodb_insert_proc (REPEAT_COUNT INT)
BEGIN
DECLARE CURRENT_NUM INT;
SET CURRENT_NUM = 0;
WHILE CURRENT_NUM < REPEAT_COUNT DO
INSERT INTO t1 VALUES(CURRENT_NUM, concat(uuid(), CURRENT_NUM, repeat('ab', floor(rand()*100) ), uuid()));
SET CURRENT_NUM = CURRENT_NUM + 1;
END WHILE;
END//
DELIMITER ;//
BEGIN;
let $n= 5000;
let $i= $n;
let $u= `SELECT uuid()`;
--disable_query_log
while ($i) {
eval INSERT INTO t1
VALUES($n-$i, concat('$u', $n-$i, repeat('ab', floor(rand()*100)), '$u'));
dec $i;
}
--enable_query_log
COMMIT;

SET AUTOCOMMIT=0;
CALL innodb_insert_proc(50000);
COMMIT;


echo # xtrabackup backup;
--disable_result_log
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
@@ -32,5 +28,4 @@ exec $INNOBACKUPEX --apply-log $targetdir;
--enable_result_log
select sum(c1) from t1;
DROP TABLE t1;
drop procedure innodb_insert_proc;
rmdir $targetdir;

0 comments on commit c89c494

Please sign in to comment.