| 1 |
-- source include/have_innodb.inc |
| 2 |
-- source include/have_example_key_management_plugin.inc |
| 3 |
-- source include/not_embedded.inc |
| 4 |
# We can't run this test under valgrind as it 'takes forever' |
| 5 |
-- source include/not_valgrind.inc |
| 6 |
|
| 7 |
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb; |
| 8 |
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact; |
| 9 |
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic; |
| 10 |
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed; |
| 11 |
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant; |
| 12 |
|
| 13 |
show warnings; |
| 14 |
|
| 15 |
show create table innodb_normal; |
| 16 |
show create table innodb_compact; |
| 17 |
show create table innodb_dynamic; |
| 18 |
show create table innodb_compressed; |
| 19 |
show create table innodb_redundant; |
| 20 |
|
| 21 |
delimiter //; |
| 22 |
create procedure innodb_insert_proc (repeat_count int) |
| 23 |
begin |
| 24 |
declare current_num int; |
| 25 |
set current_num = 0; |
| 26 |
while current_num < repeat_count do |
| 27 |
insert into innodb_normal values(current_num, substring(MD5(RAND()), -64)); |
| 28 |
set current_num = current_num + 1; |
| 29 |
end while; |
| 30 |
end// |
| 31 |
delimiter ;// |
| 32 |
commit; |
| 33 |
|
| 34 |
set autocommit=0; |
| 35 |
call innodb_insert_proc(2000); |
| 36 |
commit; |
| 37 |
set autocommit=1; |
| 38 |
|
| 39 |
insert into innodb_compact select * from innodb_normal; |
| 40 |
insert into innodb_dynamic select * from innodb_normal; |
| 41 |
insert into innodb_compressed select * from innodb_normal; |
| 42 |
insert into innodb_redundant select * from innodb_normal; |
| 43 |
|
| 44 |
update innodb_normal set c1 = c1 + 1; |
| 45 |
update innodb_compact set c1 = c1 + 1; |
| 46 |
update innodb_dynamic set c1 = c1 + 1; |
| 47 |
update innodb_compressed set c1 = c1 + 1; |
| 48 |
update innodb_redundant set c1 = c1 + 1; |
| 49 |
select count(*) from innodb_normal; |
| 50 |
select count(*) from innodb_compact where c1 < 1500000; |
| 51 |
select count(*) from innodb_dynamic where c1 < 1500000; |
| 52 |
select count(*) from innodb_compressed where c1 < 1500000; |
| 53 |
select count(*) from innodb_redundant where c1 < 1500000; |
| 54 |
select count(*) from innodb_compact t1, innodb_normal t2 where |
| 55 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 56 |
select count(*) from innodb_dynamic t1, innodb_normal t2 where |
| 57 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 58 |
select count(*) from innodb_compressed t1, innodb_normal t2 where |
| 59 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 60 |
select count(*) from innodb_redundant t1, innodb_normal t2 where |
| 61 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 62 |
|
| 63 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; |
| 64 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; |
| 65 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; |
| 66 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; |
| 67 |
|
| 68 |
--source include/restart_mysqld.inc |
| 69 |
|
| 70 |
update innodb_normal set c1 = c1 + 1; |
| 71 |
update innodb_compact set c1 = c1 + 1; |
| 72 |
update innodb_dynamic set c1 = c1 + 1; |
| 73 |
update innodb_compressed set c1 = c1 + 1; |
| 74 |
update innodb_redundant set c1 = c1 + 1; |
| 75 |
select count(*) from innodb_normal; |
| 76 |
select count(*) from innodb_compact where c1 < 1500000; |
| 77 |
select count(*) from innodb_dynamic where c1 < 1500000; |
| 78 |
select count(*) from innodb_compressed where c1 < 1500000; |
| 79 |
select count(*) from innodb_redundant where c1 < 1500000; |
| 80 |
select count(*) from innodb_compact t1, innodb_normal t2 where |
| 81 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 82 |
select count(*) from innodb_dynamic t1, innodb_normal t2 where |
| 83 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 84 |
select count(*) from innodb_compressed t1, innodb_normal t2 where |
| 85 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 86 |
select count(*) from innodb_redundant t1, innodb_normal t2 where |
| 87 |
t1.c1 = t2.c1 and t1.b = t2.b; |
| 88 |
|
| 89 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; |
| 90 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; |
| 91 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; |
| 92 |
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; |
| 93 |
|
| 94 |
drop procedure innodb_insert_proc; |
| 95 |
drop table innodb_normal; |
| 96 |
drop table innodb_compact; |
| 97 |
drop table innodb_dynamic; |
| 98 |
drop table innodb_compressed; |
| 99 |
drop table innodb_redundant; |