summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-03-29 17:03:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-03-29 17:03:34 +0300
commit980dd09be6316e5596419e7dcdb255446b40c54e (patch)
tree899d843b34e8f64ace918dab49d93f5ae0ab945b /mysql-test
parent4277c173a9815b2c2f9a53039100ad86406003e7 (diff)
parent014dfe473a10c79bb476833db915cb586c3b0fd8 (diff)
downloadmariadb-git-980dd09be6316e5596419e7dcdb255446b40c54e.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/encryption/r/innodb_lotoftables.result60
-rw-r--r--mysql-test/suite/encryption/t/innodb_lotoftables.test22
-rw-r--r--mysql-test/suite/innodb/include/no_checkpoint_end.inc5
-rw-r--r--mysql-test/suite/innodb/r/innodb_force_recovery.result8
-rw-r--r--mysql-test/suite/mariabackup/unsupported_redo.result6
-rw-r--r--mysql-test/suite/mariabackup/unsupported_redo.test46
6 files changed, 79 insertions, 68 deletions
diff --git a/mysql-test/suite/encryption/r/innodb_lotoftables.result b/mysql-test/suite/encryption/r/innodb_lotoftables.result
index 9dadf13f039..45800c8cd0b 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 4
# 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 304
-show status like 'innodb_pages0_read%';
-Variable_name Value
-Innodb_pages0_read 304
+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 304
+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 304
+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 304
+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 304
+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 304
-show status like 'innodb_pages0_read%';
-Variable_name Value
-Innodb_pages0_read 304
+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 304
-show status like 'innodb_pages0_read%';
-Variable_name Value
-Innodb_pages0_read 304
+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 304
-show status like 'innodb_pages0_read%';
-Variable_name Value
-Innodb_pages0_read 304
+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;
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/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;
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