From 47d1679ac69e96b201622bc0f5b3e5526ba571f2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 6 Feb 2018 20:26:59 +0100 Subject: fix encryption.tempfiles to check that encrypt_tmp_files is ON --- mysql-test/suite/encryption/t/tempfiles.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/suite/encryption/t/tempfiles.test') diff --git a/mysql-test/suite/encryption/t/tempfiles.test b/mysql-test/suite/encryption/t/tempfiles.test index 34dcbdf5963..fc718f4d2ab 100644 --- a/mysql-test/suite/encryption/t/tempfiles.test +++ b/mysql-test/suite/encryption/t/tempfiles.test @@ -11,6 +11,8 @@ source include/have_binlog_format_row.inc; # engine. But there's no need to run it twice for InnoDB and XtraDB. source include/have_xtradb.inc; +select @@encrypt_tmp_files; + # # MyISAM messing around with IO_CACHE::file # -- cgit v1.2.1 From b75d8453d4f41ff9ba0468747585d019ad7c4d0c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 7 Feb 2018 19:08:53 +0100 Subject: MDEV-14868 MariaDB server crashes after using ROLLBACK TO when encrypt_tmp_files=ON add a test that restores the data from a binlog --- mysql-test/suite/encryption/t/tempfiles.test | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'mysql-test/suite/encryption/t/tempfiles.test') diff --git a/mysql-test/suite/encryption/t/tempfiles.test b/mysql-test/suite/encryption/t/tempfiles.test index fc718f4d2ab..5232bcb5d12 100644 --- a/mysql-test/suite/encryption/t/tempfiles.test +++ b/mysql-test/suite/encryption/t/tempfiles.test @@ -33,6 +33,7 @@ update t1 set c=v, t=v; select sql_big_result t,count(t) from t1 group by t limit 10; drop table t1; +reset master; set global binlog_cache_size=8192; connect con1, localhost, root; @@ -50,7 +51,6 @@ commit; start transaction; insert t1 select repeat(seq, 1000) from seq_1_to_8; commit; -drop table t1; disconnect con1; connect con2, localhost, root; @@ -60,17 +60,27 @@ connect con2, localhost, root; # Start a transaction, write until the cache goes to disk, # create a savepoint, write more blocks to disk, rollback to savepoint. # -create table t1 (a text) engine=innodb; +create table t2 (a text) engine=innodb; start transaction; -insert t1 select repeat(seq, 1000) from seq_1_to_15; +insert t2 select repeat(seq, 1000) from seq_1_to_15; savepoint foo; -insert t1 select repeat(seq, 1000) from seq_16_to_30; +insert t2 select repeat(seq, 1000) from seq_16_to_30; rollback to savepoint foo; -insert t1 select repeat(seq, 1000) from seq_31_to_40; +insert t2 select repeat(seq, 1000) from seq_31_to_40; commit; -drop table t1; disconnect con2; connection default; +flush binary logs; + +drop table t1, t2; + set global binlog_cache_size=default; + +let $MYSQLD_DATADIR= `select @@datadir`; +exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL; + +select left(a, 10) from t1; +select left(a, 10) from t2; +drop table t1, t2; -- cgit v1.2.1