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 blob, b blob, c varchar(4));
29
create table t1 (a text, b char(255), c char(4)) engine=myisam;
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 blob);
53
create table t1 (a text);
54
54
insert t1 values (compress(null)), ('A\0\0\0BBBBBBBB'), (compress(space(50000))), (space(50000));
55
55
select length(a) from t1;
68
68
Error 1259 ZLIB: Input data corrupted
69
Error 1256 Uncompressed data size too large; the maximum size is 1048576 (based on max_allowed_packet). The length of uncompressed data may also be corrupted.
69
Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
71
71
set @@max_allowed_packet=1048576*100;
72
72
select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null;
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 ALL NULL NULL NULL NULL 1 Using where
96
1 SIMPLE t1 system NULL NULL NULL NULL 1
98
Error 1259 ZLIB: Input data corrupted
97
99
select * from t1 where uncompress(a) is null;
101
103
Error 1259 ZLIB: Input data corrupted
102
104
explain select *, uncompress(a) from t1;
103
105
id select_type table type possible_keys key key_len ref rows Extra
104
1 SIMPLE t1 ALL NULL NULL NULL NULL 1
106
1 SIMPLE t1 system NULL NULL NULL NULL 1
105
107
select *, uncompress(a) from t1;
109
111
Error 1259 ZLIB: Input data corrupted
110
112
select *, uncompress(a), uncompress(a) is null from t1;
111
a uncompress(a) uncompress(a) is null
113
a uncompress(a) uncompress(a) is null
114
116
Error 1259 ZLIB: Input data corrupted
115
117
Error 1259 ZLIB: Input data corrupted
119
ERROR 42000: Incorrect parameter count in the call to native function 'compress'
121
ERROR 42000: Incorrect parameter count in the call to native function 'uncompress'
122
select uncompressed_length();
123
ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length'
124
select compress('aeou', 'aoeu', 'aoeu');
125
ERROR 42000: Incorrect parameter count in the call to native function 'compress'
126
select uncompress('aoenuthn', 'aoeu');
127
ERROR 42000: Incorrect parameter count in the call to native function 'uncompress'
128
select uncompressed_length('aneohusa','naohuntah','onh');
129
ERROR 42000: Incorrect parameter count in the call to native function 'uncompressed_length'