| 1 |
-- source include/have_innodb.inc |
| 2 |
-- source include/have_file_key_management_plugin.inc |
| 3 |
# not embedded because of restarts |
| 4 |
-- source include/not_embedded.inc |
| 5 |
|
| 6 |
let $encryption = `SELECT @@innodb_encrypt_tables`; |
| 7 |
# zlib |
| 8 |
set global innodb_compression_algorithm = 1; |
| 9 |
|
| 10 |
create database enctests; |
| 11 |
use enctests; |
| 12 |
create table t1(a int not null primary key, b char(200)) engine=innodb; |
| 13 |
create table t2(a int not null primary key, b char(200)) engine=innodb row_format=compressed; |
| 14 |
create table t3(a int not null primary key, b char(200)) engine=innodb page_compressed=yes; |
| 15 |
create table t4(a int not null primary key, b char(200)) engine=innodb encrypted=yes; |
| 16 |
create table t5(a int not null primary key, b char(200)) engine=innodb encrypted=yes row_format=compressed; |
| 17 |
create table t6(a int not null primary key, b char(200)) engine=innodb encrypted=yes page_compressed=yes; |
| 18 |
create table t7(a int not null primary key, b char(200)) engine=innodb encrypted=no; |
| 19 |
create table t8(a int not null primary key, b char(200)) engine=innodb encrypted=no row_format=compressed; |
| 20 |
create table t9(a int not null primary key, b char(200)) engine=innodb encrypted=no page_compressed=yes; |
| 21 |
|
| 22 |
insert into t1 values (1, 'secredmessage'); |
| 23 |
insert into t2 values (1, 'secredmessage'); |
| 24 |
insert into t3 values (1, 'secredmessagecompressedaaaaaaaaabbbbbbbbbbbbbbccccccccccccccc'); |
| 25 |
insert into t4 values (1, 'secredmessage'); |
| 26 |
insert into t5 values (1, 'secredmessage'); |
| 27 |
insert into t6 values (1, 'secredmessagecompressedaaaaaaaaabbbbbbbbbbbbbbccccccccccccccc'); |
| 28 |
insert into t7 values (1, 'publicmessage'); |
| 29 |
insert into t8 values (1, 'publicmessage'); |
| 30 |
insert into t9 values (1, 'pugliccompressedaaaaaaaaabbbbbbbbbbbbbbccccccccccccccc'); |
| 31 |
|
| 32 |
--echo # should list tables t1-t6 |
| 33 |
--sorted_result |
| 34 |
SELECT NAME,ENCRYPTION_SCHEME,CURRENT_KEY_ID FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'enctests%'; |
| 35 |
--echo # should list tables t7-t9 |
| 36 |
--sorted_result |
| 37 |
SELECT NAME,ENCRYPTION_SCHEME,CURRENT_KEY_ID FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 and NAME LIKE 'enctests%'; |
| 38 |
|
| 39 |
--let $MYSQLD_DATADIR=`select @@datadir` |
| 40 |
|
| 41 |
-- source include/shutdown_mysqld.inc |
| 42 |
|
| 43 |
--let SEARCH_RANGE = 10000000 |
| 44 |
--let SEARCH_PATTERN=secred |
| 45 |
--echo # t1 default on expecting NOT FOUND |
| 46 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t1.ibd |
| 47 |
-- source include/search_pattern_in_file.inc |
| 48 |
--echo # t2 default on expecting NOT FOUND |
| 49 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t2.ibd |
| 50 |
-- source include/search_pattern_in_file.inc |
| 51 |
--echo # t3 default on expecting NOT FOUND |
| 52 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t3.ibd |
| 53 |
-- source include/search_pattern_in_file.inc |
| 54 |
--echo # t4 on expecting NOT FOUND |
| 55 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t4.ibd |
| 56 |
-- source include/search_pattern_in_file.inc |
| 57 |
--echo # t5 on expecting NOT FOUND |
| 58 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t5.ibd |
| 59 |
-- source include/search_pattern_in_file.inc |
| 60 |
--echo # t6 on expecting NOT FOUND |
| 61 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t6.ibd |
| 62 |
-- source include/search_pattern_in_file.inc |
| 63 |
--let SEARCH_PATTERN=public |
| 64 |
--echo # t7 off expecting FOUND |
| 65 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t7.ibd |
| 66 |
-- source include/search_pattern_in_file.inc |
| 67 |
--echo # t8 row compressed expecting NOT FOUND |
| 68 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t8.ibd |
| 69 |
-- source include/search_pattern_in_file.inc |
| 70 |
--echo # t9 page compressed expecting NOT FOUND |
| 71 |
-- let SEARCH_FILE=$MYSQLD_DATADIR/enctests/t9.ibd |
| 72 |
-- source include/search_pattern_in_file.inc |
| 73 |
|
| 74 |
-- source include/start_mysqld.inc |
| 75 |
|
| 76 |
drop database enctests; |