~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2008-07-05 18:10:38 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: monty@inaugust.com-20080705181038-0ih0nnamu5qrut0y
Fixed prototypes. Cleaned define a little bit.

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)
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