Debian Codegraph @

mysql-test/suite/plugins/t/compression.test

raw
1 let $engine=`select regexp_replace('$MTR_COMBINATIONS', '-.*', '')`;
2 let $alg=`select regexp_replace('$MTR_COMBINATIONS', '.*-', '')`;
3
4 if (`select count(*) = 0 from information_schema.plugins where plugin_name = '$engine' and plugin_status='active'`)
5 {
6 skip Needs $engine engine;
7 }
8
9 if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`)
10 {
11 skip Needs provider_$alg plugin;
12 }
13
14 --echo #
15 --echo # Testing $alg compression provider with $engine
16 --echo #
17
18 call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
19 if ($engine == "innodb") {
20 eval set global innodb_compression_algorithm = $alg;
21 let $table_params = page_compressed = 1;
22 call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
23 call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
24 call mtr.add_suppression("Table `test`.`t1` is corrupted. Please drop the table and recreate");
25 call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
26 call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
27 }
28 if ($engine == "mroonga") {
29 let $column_params = `select upper('COMMENT \'flags "COLUMN_SCALAR|COMPRESS_$alg"\'')`;
30 let $table_params = charset = utf8;
31 }
32
33 eval create table t1 (a int, b text $column_params) engine = $engine $table_params;
34
35 insert t1 (a, b) values (0, repeat("abc", 100));
36 insert t1 (a, b) values (1, repeat("def", 1000));
37 insert t1 (a, b) values (2, repeat("ghi", 10000));
38 select a, left(b, 9), length(b) from t1;
39
40 let $restart_parameters = --disable-provider-$alg;
41 source include/restart_mysqld.inc;
42
43 if ($engine == "innodb") {
44 error ER_TABLE_CORRUPT;
45 select a, left(b, 9), length(b) from t1;
46 show warnings;
47 }
48 if ($engine == "mroonga"){
49 select a, left(b, 9), length(b) from t1;
50 select a, left(b, 9), length(b) from t1; # a warning once per statement
51 }
52 drop table t1;
53
54 let $restart_parameters =;
55 source include/restart_mysqld.inc;