Debian Codegraph @

mysql-test/suite/encryption/r/innodb-page_encryption_compression.result

raw
1 set global innodb_compression_algorithm = 1;
2 create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1;
3 show warnings;
4 Level Code Message
5 create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1 page_compressed=1;
6 show warnings;
7 Level Code Message
8 create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=2 page_compressed=1;
9 show warnings;
10 Level Code Message
11 show create table innodb_normal;
12 Table Create Table
13 innodb_normal CREATE TABLE `innodb_normal` (
14 `c1` bigint(20) NOT NULL,
15 `b` char(200) DEFAULT NULL
16 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `page_compressed`=1
17 show create table innodb_compact;
18 Table Create Table
19 innodb_compact CREATE TABLE `innodb_compact` (
20 `c1` bigint(20) NOT NULL,
21 `b` char(200) DEFAULT NULL
22 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPACT `encrypted`=yes `encryption_key_id`=1 `page_compressed`=1
23 show create table innodb_dynamic;
24 Table Create Table
25 innodb_dynamic CREATE TABLE `innodb_dynamic` (
26 `c1` bigint(20) NOT NULL,
27 `b` char(200) DEFAULT NULL
28 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=2 `page_compressed`=1
29 create procedure innodb_insert_proc (repeat_count int)
30 begin
31 declare current_num int;
32 set current_num = 0;
33 while current_num < repeat_count do
34 insert into innodb_normal values(current_num, substring(MD5(RAND()), -128));
35 set current_num = current_num + 1;
36 end while;
37 end//
38 commit;
39 begin;
40 call innodb_insert_proc(2000);
41 insert into innodb_compact select * from innodb_normal;
42 insert into innodb_dynamic select * from innodb_normal;
43 commit;
44 FLUSH TABLES innodb_compact FOR EXPORT;
45 UNLOCK TABLES;
46 FLUSH TABLES innodb_dynamic FOR EXPORT;
47 UNLOCK TABLES;
48 select variable_value > 0 from information_schema.global_status
49 where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
50 variable_value > 0
51 1
52 # restart: --innodb-encrypt-tables=OFF
53 set global innodb_compression_algorithm = 1;
54 alter table innodb_normal engine=innodb page_compressed=DEFAULT;
55 show create table innodb_normal;
56 Table Create Table
57 innodb_normal CREATE TABLE `innodb_normal` (
58 `c1` bigint(20) NOT NULL,
59 `b` char(200) DEFAULT NULL
60 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
61 alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
62 show create table innodb_compact;
63 Table Create Table
64 innodb_compact CREATE TABLE `innodb_compact` (
65 `c1` bigint(20) NOT NULL,
66 `b` char(200) DEFAULT NULL
67 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPACT
68 alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
69 show create table innodb_dynamic;
70 Table Create Table
71 innodb_dynamic CREATE TABLE `innodb_dynamic` (
72 `c1` bigint(20) NOT NULL,
73 `b` char(200) DEFAULT NULL
74 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC
75 FLUSH TABLES innodb_normal FOR EXPORT;
76 UNLOCK TABLES;
77 FLUSH TABLES innodb_compact FOR EXPORT;
78 UNLOCK TABLES;
79 FLUSH TABLES innodb_dynamic FOR EXPORT;
80 UNLOCK TABLES;
81 select variable_value > 0 from information_schema.global_status
82 where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
83 variable_value > 0
84 1
85 drop procedure innodb_insert_proc;
86 drop table innodb_normal;
87 drop table innodb_compact;
88 drop table innodb_dynamic;