diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-17 12:33:31 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-17 12:38:46 +0200 |
commit | 77cbaa96ad9a6077d271bf97b0c0dc8cdf5b5991 (patch) | |
tree | ba8d2c87f8d15d064657315f48ccb58aa117b95a /mysql-test/suite/encryption | |
parent | 62a0224666fd0b2790837288cafde009f02e2b52 (diff) | |
parent | 8e80fd6bfdf2ea7d1870662ecd4d8129f3c76301 (diff) | |
download | mariadb-git-77cbaa96ad9a6077d271bf97b0c0dc8cdf5b5991.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/suite/encryption')
-rw-r--r-- | mysql-test/suite/encryption/r/innodb-encryption-alter.result | 28 | ||||
-rw-r--r-- | mysql-test/suite/encryption/t/innodb-encryption-alter.test | 38 |
2 files changed, 56 insertions, 10 deletions
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index 1d5b88bc750..995360a5744 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -77,7 +77,6 @@ t2 CREATE TABLE `t2` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -DROP TABLE t2; CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4; ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options") SHOW WARNINGS; @@ -85,3 +84,30 @@ Level Code Message Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1 Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options") Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +FLUSH TABLES; +create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes; +insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8); +insert into t1 select * from t1; +BEGIN; +INSERT INTO t2 VALUES (1); +connect con1, localhost, root; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever'; +alter table t1 force; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR done'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +COMMIT; +disconnect con1; +select * from t1; +f1 f2 +1 2 +2 3 +4 5 +5 6 +7 8 +1 2 +2 3 +4 5 +5 6 +7 8 +drop table t1,t2; diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index e8391d97d6c..a6a4dbaff9b 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -1,13 +1,12 @@ -- source include/have_innodb.inc +-- source include/have_debug.inc +-- source include/have_debug_sync.inc -- source include/have_file_key_management_plugin.inc # # MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID # -let $encrypt_tables = `SELECT @@innodb_encrypt_tables`; -let $threads = `SELECT @@innodb_encryption_threads`; - SET GLOBAL innodb_encrypt_tables = ON; SET GLOBAL innodb_encryption_threads = 4; @@ -99,14 +98,35 @@ ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY; --replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ SHOW WARNINGS; SHOW CREATE TABLE t2; -DROP TABLE t2; --error ER_CANT_CREATE_TABLE CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4; SHOW WARNINGS; -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables; -EVAL SET GLOBAL innodb_encryption_threads = $threads; ---enable_query_log +FLUSH TABLES; + +create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes; +insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8); +insert into t1 select * from t1; +BEGIN; +INSERT INTO t2 VALUES (1); + +connect con1, localhost, root; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever'; +send alter table t1 force; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR done'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +COMMIT; + +--let $shutdown_timeout= 0 +--source include/restart_mysqld.inc +disconnect con1; + +select * from t1; +drop table t1,t2; + +# Work around missing crash recovery at the SQL layer. +let $datadir= `select @@datadir`; +--remove_files_wildcard $datadir/test #sql-*.frm |