| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/have_file_key_management_plugin.inc |
| 3 |
--source include/count_sessions.inc |
| 4 |
|
| 5 |
SET @save_threads = @@GLOBAL.innodb_encryption_threads; |
| 6 |
|
| 7 |
SET default_storage_engine = InnoDB; |
| 8 |
|
| 9 |
# |
| 10 |
# MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1 |
| 11 |
# |
| 12 |
|
| 13 |
SET GLOBAL innodb_encryption_threads = 4; |
| 14 |
|
| 15 |
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; |
| 16 |
INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3); |
| 17 |
|
| 18 |
CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb; |
| 19 |
|
| 20 |
CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; |
| 21 |
|
| 22 |
INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL); |
| 23 |
INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 ); |
| 24 |
INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); |
| 25 |
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); |
| 26 |
|
| 27 |
--connect (con1,localhost,root,,test) |
| 28 |
--connect (con2,localhost,root,,test) |
| 29 |
|
| 30 |
--disable_query_log |
| 31 |
|
| 32 |
let $i = 100; |
| 33 |
while ($i) |
| 34 |
{ |
| 35 |
connection con1; |
| 36 |
send SET GLOBAL innodb_encrypt_tables = ON; |
| 37 |
connection default; |
| 38 |
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; |
| 39 |
connection con2; |
| 40 |
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; |
| 41 |
connection default; |
| 42 |
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`; |
| 43 |
connection con1; |
| 44 |
--reap; |
| 45 |
send SET GLOBAL innodb_encrypt_tables = OFF; |
| 46 |
connection con2; |
| 47 |
--reap; |
| 48 |
connection default; |
| 49 |
--reap; |
| 50 |
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; |
| 51 |
connection con2; |
| 52 |
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; |
| 53 |
connection con1; |
| 54 |
--reap; |
| 55 |
send SET GLOBAL innodb_encrypt_tables = ON; |
| 56 |
connection default; |
| 57 |
--reap; |
| 58 |
send CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table1_int_autoinc`; |
| 59 |
connection con2; |
| 60 |
--reap; |
| 61 |
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table10_int_autoinc`; |
| 62 |
CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM `table0_int_autoinc`; |
| 63 |
connection con1; |
| 64 |
--reap; |
| 65 |
connection default; |
| 66 |
--reap; |
| 67 |
dec $i; |
| 68 |
} |
| 69 |
|
| 70 |
--enable_query_log |
| 71 |
disconnect con1; |
| 72 |
disconnect con2; |
| 73 |
connection default; |
| 74 |
drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc, |
| 75 |
table10_int_autoinc; |
| 76 |
|
| 77 |
SET GLOBAL innodb_encryption_threads = @save_threads; |
| 78 |
--source include/wait_until_count_sessions.inc |