26
26
select length(compress(@test_compress_string))<length(@test_compress_string);
27
27
length(compress(@test_compress_string))<length(@test_compress_string)
29
create table t1 (a text, b char(255), c char(4)) engine=myisam;
29
create table t1 (a blob, b blob, c varchar(4));
30
30
insert into t1 (a,b,c) values (compress(@test_compress_string),compress(@test_compress_string),'d ');
31
31
select uncompress(a) from t1;
50
50
select uncompressed_length("");
51
51
uncompressed_length("")
53
create table t1 (a text);
53
create table t1 (a blob);
54
54
insert t1 values (compress(null)), ('A\0\0\0BBBBBBBB'), (compress(space(50000))), (space(50000));
55
55
select length(a) from t1;
83
83
insert into t1 values ('0'), (NULL), ('0');
84
84
select compress(a), compress(a) from t1;
85
85
select compress(a) is null from t1;
93
93
insert into t1 values ('foo');
94
94
explain select * from t1 where uncompress(a) is null;
95
95
id select_type table type possible_keys key key_len ref rows Extra
96
1 SIMPLE t1 system NULL NULL NULL NULL 1
98
Error 1259 ZLIB: Input data corrupted
96
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using where
99
97
select * from t1 where uncompress(a) is null;
103
101
Error 1259 ZLIB: Input data corrupted
104
102
explain select *, uncompress(a) from t1;
105
103
id select_type table type possible_keys key key_len ref rows Extra
106
1 SIMPLE t1 system NULL NULL NULL NULL 1
104
1 SIMPLE t1 ALL NULL NULL NULL NULL 1
107
105
select *, uncompress(a) from t1;
111
109
Error 1259 ZLIB: Input data corrupted
112
110
select *, uncompress(a), uncompress(a) is null from t1;
113
a uncompress(a) uncompress(a) is null
111
a uncompress(a) uncompress(a) is null
116
114
Error 1259 ZLIB: Input data corrupted
117
115
Error 1259 ZLIB: Input data corrupted
119
ERROR 42000: Incorrect parameters in the call to native function 'compress'
121
ERROR 42000: Incorrect parameters in the call to native function 'uncompress'
122
select uncompressed_length();
123
ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length'
124
select compress('aeou', 'aoeu', 'aoeu');
125
ERROR 42000: Incorrect parameters in the call to native function 'compress'
126
select uncompress('aoenuthn', 'aoeu');
127
ERROR 42000: Incorrect parameters in the call to native function 'uncompress'
128
select uncompressed_length('aneohusa','naohuntah','onh');
129
ERROR 42000: Incorrect parameters in the call to native function 'uncompressed_length'