~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/func_compress.result

  • Committer: Brian Aker
  • Date: 2008-07-08 16:17:31 UTC
  • Revision ID: brian@tangent.org-20080708161731-io36j7igglok79py
DATE cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
select length(compress(@test_compress_string))<length(@test_compress_string);
27
27
length(compress(@test_compress_string))<length(@test_compress_string)
28
28
1
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;
32
32
uncompress(a)
36
36
string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
37
37
select concat('|',c,'|') from t1;
38
38
concat('|',c,'|')
39
 
|d |
 
39
|d|
40
40
drop table t1;
41
41
select compress("");
42
42
compress("")
50
50
select uncompressed_length("");
51
51
uncompressed_length("")
52
52
0
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;
56
56
length(a)
66
66
NULL
67
67
Warnings:
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)
70
70
drop table t1;
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;
86
 
compress(a) is null 
 
86
compress(a) is null
87
87
0
88
88
1
89
89
0
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       
 
97
Warnings:
 
98
Error   1259    ZLIB: Input data corrupted
97
99
select * from t1 where uncompress(a) is null;
98
100
a
99
101
foo
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;
106
108
a       uncompress(a)
107
109
foo     NULL
108
110
Warnings:
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
112
114
foo     NULL    1
113
115
Warnings:
114
116
Error   1259    ZLIB: Input data corrupted
115
117
Error   1259    ZLIB: Input data corrupted
116
118
drop table t1;
117
119
End of 5.0 tests
118
 
select compress();
119
 
ERROR 42000: Incorrect parameter count in the call to native function 'compress'
120
 
select uncompress();
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'