From 3b119d9d30f5149bc5e6297bec8ffbdd55892ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 28 Mar 2018 13:14:24 +0300 Subject: MDEV-11531: encryption.innodb_lotoftables failed in buildbot Test changes only. --- .../suite/encryption/r/innodb_lotoftables.result | 60 +++++++++------------- .../suite/encryption/t/innodb_lotoftables.test | 22 ++++---- 2 files changed, 34 insertions(+), 48 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/encryption/r/innodb_lotoftables.result b/mysql-test/suite/encryption/r/innodb_lotoftables.result index da07a52f8c3..bf70b49b371 100644 --- a/mysql-test/suite/encryption/r/innodb_lotoftables.result +++ b/mysql-test/suite/encryption/r/innodb_lotoftables.result @@ -774,49 +774,37 @@ Innodb_pages0_read 3 # Success! # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0 # Restart Success! -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use test; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_1; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_2; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_3; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_1; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_2; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 use innodb_encrypted_3; -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 -show status like 'innodb_pages0_read%'; -Variable_name Value -Innodb_pages0_read 303 +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; +variable_value <= 303 +1 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME; NAME innodb_encrypted_3/t_1 diff --git a/mysql-test/suite/encryption/t/innodb_lotoftables.test b/mysql-test/suite/encryption/t/innodb_lotoftables.test index cd3c6a30c07..4ccdc7d5c49 100644 --- a/mysql-test/suite/encryption/t/innodb_lotoftables.test +++ b/mysql-test/suite/encryption/t/innodb_lotoftables.test @@ -148,20 +148,19 @@ show status like 'innodb_pages0_read%'; -- source include/restart_mysqld.inc --echo # Restart Success! -show status like 'innodb_pages0_read%'; -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use test; -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_1; -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_2; -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_3; -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_1; -show status like 'innodb_pages0_read%'; + --disable_result_log --disable_query_log let $tables = 100; @@ -173,10 +172,9 @@ while ($tables) --enable_query_log --enable_result_log -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_2; -show status like 'innodb_pages0_read%'; --disable_result_log --disable_query_log @@ -189,10 +187,10 @@ while ($tables) --enable_query_log --enable_result_log -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; use innodb_encrypted_3; -show status like 'innodb_pages0_read%'; + --disable_result_log --disable_query_log let $tables = 100; @@ -204,7 +202,7 @@ while ($tables) --enable_query_log --enable_result_log -show status like 'innodb_pages0_read%'; +SELECT variable_value <= 303 FROM information_schema.global_status WHERE variable_name = 'innodb_pages0_read'; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME; SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME; -- cgit v1.2.1 From adaee46a908cc2ca39ea5add85942dad714a2f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 29 Mar 2018 13:22:59 +0300 Subject: MDEV-15682 mariabackup.unsupported_redo fails in buildbot with wrong result code Skip the test mariabackup.unsupported_redo if a checkpoint occurred before mariabackup --backup completed. Remove the slow shutdowns and restarts which were attempting to prevent the checkpoints from occurring. --- .../suite/innodb/include/no_checkpoint_end.inc | 5 ++- .../suite/mariabackup/unsupported_redo.result | 6 +-- mysql-test/suite/mariabackup/unsupported_redo.test | 46 ++++++++++++++++------ 3 files changed, 41 insertions(+), 16 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/include/no_checkpoint_end.inc b/mysql-test/suite/innodb/include/no_checkpoint_end.inc index 7ca81f8ade0..4a00dadfd6e 100644 --- a/mysql-test/suite/innodb/include/no_checkpoint_end.inc +++ b/mysql-test/suite/innodb/include/no_checkpoint_end.inc @@ -1,7 +1,9 @@ # Check that the latest checkpoint in the redo log files # is not newer than the checkpoint sampled by no_checkpoint_start.inc +if (!$no_checkpoint_kill) { --source include/kill_mysqld.inc +} perl; my $cp = $ENV{CHECKPOINT_LSN}; @@ -22,7 +24,8 @@ my $cp2 = $cp2hi << 32 | $cp2lo; open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die; if ($cp1 > $cp || $cp2 > $cp) { - print OUT "--source include/start_mysqld.inc\n"; + print OUT "--source include/start_mysqld.inc\n" + unless $ENV{no_checkpoint_kill}; print OUT "$ENV{CLEANUP_IF_CHECKPOINT}\n"; print OUT "--skip Extra checkpoint 1 after $cp"; print OUT " ($no1hi:$no1lo=$cp1,$no2hi:$no2lo=$cp2)\n"; diff --git a/mysql-test/suite/mariabackup/unsupported_redo.result b/mysql-test/suite/mariabackup/unsupported_redo.result index 29f043fc643..543e564d8a8 100644 --- a/mysql-test/suite/mariabackup/unsupported_redo.result +++ b/mysql-test/suite/mariabackup/unsupported_redo.result @@ -5,8 +5,10 @@ call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that yo call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\\.`t21` because it could not be opened"); call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: "); call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); +SELECT @@GLOBAL.innodb_flush_log_at_trx_commit; +@@GLOBAL.innodb_flush_log_at_trx_commit +1 CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; # Fails during full backup DROP TABLE t1; @@ -14,7 +16,6 @@ CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; INSERT INTO t1(a) select 1 union select 2 union select 3; # Create full backup , modify table, then fails during creation of # incremental/differential backup -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; DROP TABLE t1; CREATE TABLE t1(i INT) ENGINE INNODB; @@ -22,7 +23,6 @@ INSERT INTO t1 VALUES(1); CREATE TABLE t21(i INT) ENGINE INNODB; INSERT INTO t21 VALUES(1); CREATE TABLE t2(i int) ENGINE INNODB; -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ALTER TABLE t21 FORCE, ALGORITHM=INPLACE; # Create partial backup (excluding table t21), Ignore the # unsupported redo log for the table t21. diff --git a/mysql-test/suite/mariabackup/unsupported_redo.test b/mysql-test/suite/mariabackup/unsupported_redo.test index f54f97b6c8b..9d54c5bbe87 100644 --- a/mysql-test/suite/mariabackup/unsupported_redo.test +++ b/mysql-test/suite/mariabackup/unsupported_redo.test @@ -10,11 +10,9 @@ call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace let $basedir=$MYSQLTEST_VARDIR/tmp/backup; let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; +SELECT @@GLOBAL.innodb_flush_log_at_trx_commit; CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; - -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ---source include/restart_mysqld.inc - +--source ../../suite/innodb/include/no_checkpoint_start.inc ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; # Below mariabackup operation may complete successfully if checkpoint happens @@ -22,11 +20,25 @@ ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; echo # Fails during full backup; --disable_result_log ---error 1 +--error 0,1 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log DROP TABLE t1; + +--let MYSQLD_DATADIR=$basedir/ +perl; +open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die; +print OUT ' +--let no_checkpoint_end=1 +--let CLEANUP_IF_CHECKPOINT=rmdir $basedir; +--source ../../suite/innodb/include/no_checkpoint_end.inc +--exit Backup failed to fail despite MLOG_INDEX_LOAD record +' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info"); +close(OUT); +EOF +--source $MYSQLTEST_VARDIR/log/check.txt +--remove_file $MYSQLTEST_VARDIR/log/check.txt rmdir $basedir; CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; @@ -39,18 +51,30 @@ INSERT INTO t1(a) select 1 union select 2 union select 3; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ---source include/restart_mysqld.inc +--source ../../suite/innodb/include/no_checkpoint_start.inc ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; --disable_result_log ---error 1 +--error 0,1 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir; --enable_result_log DROP TABLE t1; -rmdir $basedir; -rmdir $incremental_dir; + +--let MYSQLD_DATADIR=$incremental_dir/ +perl; +open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die; +print OUT ' +--let no_checkpoint_end=1 +--let CLEANUP_IF_CHECKPOINT=rmdir $basedir;rmdir $incremental_dir; +--source ../../suite/innodb/include/no_checkpoint_end.inc +--exit Backup failed to fail despite MLOG_INDEX_LOAD record +' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info"); +close(OUT); +EOF +--source $MYSQLTEST_VARDIR/log/check.txt +--remove_file $MYSQLTEST_VARDIR/log/check.txt +rmdir $basedir;rmdir $incremental_dir; CREATE TABLE t1(i INT) ENGINE INNODB; INSERT INTO t1 VALUES(1); @@ -62,8 +86,6 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/bk; CREATE TABLE t2(i int) ENGINE INNODB; -SET GLOBAL INNODB_FAST_SHUTDOWN = 0; ---source include/restart_mysqld.inc ALTER TABLE t21 FORCE, ALGORITHM=INPLACE; --echo # Create partial backup (excluding table t21), Ignore the -- cgit v1.2.1 From 014dfe473a10c79bb476833db915cb586c3b0fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 29 Mar 2018 16:58:59 +0300 Subject: MDEV-15719: Adjust a test case --- mysql-test/suite/innodb/r/innodb_force_recovery.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/innodb_force_recovery.result b/mysql-test/suite/innodb/r/innodb_force_recovery.result index d71a6c4e8b0..bd533207ad2 100644 --- a/mysql-test/suite/innodb/r/innodb_force_recovery.result +++ b/mysql-test/suite/innodb/r/innodb_force_recovery.result @@ -12,11 +12,11 @@ ERROR HY000: Running in read-only mode alter table t1 add f3 int not null, algorithm=copy; ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only") alter table t1 add f3 int not null, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Operation not allowed when innodb_forced_recovery > 0.. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY drop index idx on t1; ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only") alter table t1 drop index idx, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Operation not allowed when innodb_forced_recovery > 0.. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY update t1 set f1=3 where f2=2; ERROR HY000: Running in read-only mode create table t3(f1 int not null)engine=innodb; @@ -40,7 +40,7 @@ ERROR HY000: Running in read-only mode alter table t2 add f3 int not null, algorithm=copy; ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only") alter table t2 add f3 int not null, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Operation not allowed when innodb_forced_recovery > 0.. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY drop index idx on t2; ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only") update t2 set f1=3 where f2=2; @@ -67,7 +67,7 @@ ERROR HY000: Table 't2' is read only alter table t2 add f3 int not null, algorithm=copy; ERROR HY000: Table 't2' is read only alter table t2 add f3 int not null, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Operation not allowed when innodb_forced_recovery > 0.. Try ALGORITHM=COPY +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY drop index idx on t2; ERROR HY000: Table 't2' is read only update t2 set f1=3 where f2=2; -- cgit v1.2.1