| 1 |
-- source include/have_innodb.inc |
| 2 |
-- source include/have_file_key_management_plugin.inc |
| 3 |
-- source include/not_embedded.inc |
| 4 |
|
| 5 |
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes; |
| 6 |
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes; |
| 7 |
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes; |
| 8 |
create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes; |
| 9 |
|
| 10 |
insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate'); |
| 11 |
insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate'); |
| 12 |
insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate'); |
| 13 |
insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate'); |
| 14 |
insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate'); |
| 15 |
insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate'); |
| 16 |
insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate'); |
| 17 |
insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate'); |
| 18 |
insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate'); |
| 19 |
insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate'); |
| 20 |
|
| 21 |
insert into innodb_compressed2 select * from innodb_compressed1; |
| 22 |
insert into innodb_compressed3 select * from innodb_compressed1; |
| 23 |
insert into innodb_compressed4 select * from innodb_compressed1; |
| 24 |
|
| 25 |
--source include/restart_mysqld.inc |
| 26 |
|
| 27 |
--let $MYSQLD_DATADIR=`select @@datadir` |
| 28 |
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_compressed1.ibd |
| 29 |
--let t2_IBD = $MYSQLD_DATADIR/test/innodb_compressed2.ibd |
| 30 |
--let t3_IBD = $MYSQLD_DATADIR/test/innodb_compressed3.ibd |
| 31 |
--let t4_IBD = $MYSQLD_DATADIR/test/innodb_compressed4.ibd |
| 32 |
--let SEARCH_RANGE = 10000000 |
| 33 |
--let SEARCH_PATTERN=private |
| 34 |
--echo # t1 yes on expecting NOT FOUND |
| 35 |
-- let SEARCH_FILE=$t1_IBD |
| 36 |
-- source include/search_pattern_in_file.inc |
| 37 |
--echo # t2 yes on expecting NOT FOUND |
| 38 |
-- let SEARCH_FILE=$t2_IBD |
| 39 |
-- source include/search_pattern_in_file.inc |
| 40 |
--echo # t3 yes on expecting NOT FOUND |
| 41 |
-- let SEARCH_FILE=$t3_IBD |
| 42 |
-- source include/search_pattern_in_file.inc |
| 43 |
--echo # t4 yes on expecting NOT FOUND |
| 44 |
-- let SEARCH_FILE=$t4_IBD |
| 45 |
-- source include/search_pattern_in_file.inc |
| 46 |
|
| 47 |
select * from innodb_compressed1 where d = 20; |
| 48 |
select * from innodb_compressed1 where d = 30; |
| 49 |
select * from innodb_compressed2 where d = 20; |
| 50 |
select * from innodb_compressed2 where d = 30; |
| 51 |
select * from innodb_compressed3 where d = 20; |
| 52 |
select * from innodb_compressed3 where d = 30; |
| 53 |
select * from innodb_compressed4 where d = 20; |
| 54 |
select * from innodb_compressed4 where d = 30; |
| 55 |
|
| 56 |
update innodb_compressed1 set d = d + 10 where d = 30; |
| 57 |
update innodb_compressed2 set d = d + 10 where d = 30; |
| 58 |
update innodb_compressed3 set d = d + 10 where d = 30; |
| 59 |
update innodb_compressed4 set d = d + 10 where d = 30; |
| 60 |
|
| 61 |
insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate'); |
| 62 |
insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate'); |
| 63 |
insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate'); |
| 64 |
insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate'); |
| 65 |
|
| 66 |
--let SEARCH_PATTERN=private |
| 67 |
--echo # t1 yes on expecting NOT FOUND |
| 68 |
-- let SEARCH_FILE=$t1_IBD |
| 69 |
-- source include/search_pattern_in_file.inc |
| 70 |
--echo # t2 yes on expecting NOT FOUND |
| 71 |
-- let SEARCH_FILE=$t2_IBD |
| 72 |
-- source include/search_pattern_in_file.inc |
| 73 |
--echo # t3 yes on expecting NOT FOUND |
| 74 |
-- let SEARCH_FILE=$t3_IBD |
| 75 |
-- source include/search_pattern_in_file.inc |
| 76 |
--echo # t4 yes on expecting NOT FOUND |
| 77 |
-- let SEARCH_FILE=$t4_IBD |
| 78 |
-- source include/search_pattern_in_file.inc |
| 79 |
|
| 80 |
--source include/restart_mysqld.inc |
| 81 |
|
| 82 |
select * from innodb_compressed1 where d = 40; |
| 83 |
select * from innodb_compressed1 where d = 60; |
| 84 |
select * from innodb_compressed2 where d = 40; |
| 85 |
select * from innodb_compressed2 where d = 60; |
| 86 |
select * from innodb_compressed3 where d = 40; |
| 87 |
select * from innodb_compressed3 where d = 60; |
| 88 |
select * from innodb_compressed4 where d = 40; |
| 89 |
select * from innodb_compressed4 where d = 60; |
| 90 |
|
| 91 |
--let SEARCH_PATTERN=private |
| 92 |
--echo # t1 yes on expecting NOT FOUND |
| 93 |
-- let SEARCH_FILE=$t1_IBD |
| 94 |
-- source include/search_pattern_in_file.inc |
| 95 |
--echo # t2 yes on expecting NOT FOUND |
| 96 |
-- let SEARCH_FILE=$t2_IBD |
| 97 |
-- source include/search_pattern_in_file.inc |
| 98 |
--echo # t3 yes on expecting NOT FOUND |
| 99 |
-- let SEARCH_FILE=$t3_IBD |
| 100 |
-- source include/search_pattern_in_file.inc |
| 101 |
--echo # t4 yes on expecting NOT FOUND |
| 102 |
-- let SEARCH_FILE=$t4_IBD |
| 103 |
-- source include/search_pattern_in_file.inc |
| 104 |
|
| 105 |
drop table innodb_compressed1; |
| 106 |
drop table innodb_compressed2; |
| 107 |
drop table innodb_compressed3; |
| 108 |
drop table innodb_compressed4; |