mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Merge mysql.com:/usr/home/ram/work/bug23254/my41-bug23254
into mysql.com:/usr/home/ram/work/bug23254/my50-bug23254 sql/item_strfunc.cc: Auto merged mysql-test/r/func_compress.result: SCCS merged mysql-test/t/func_compress.test: SCCS merged
This commit is contained in:
commit
0ace2b44ba
3 changed files with 24 additions and 1 deletions
|
@ -79,6 +79,16 @@ uncompress(a) uncompressed_length(a)
|
|||
NULL NULL
|
||||
a 1
|
||||
drop table t1;
|
||||
create table t1(a blob);
|
||||
insert into t1 values ('0'), (NULL), ('0');
|
||||
select compress(a), compress(a) from t1;
|
||||
select compress(a) is null from t1;
|
||||
compress(a) is null
|
||||
0
|
||||
1
|
||||
0
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
create table t1 (a varchar(32) not null);
|
||||
insert into t1 values ('foo');
|
||||
explain select * from t1 where uncompress(a) is null;
|
||||
|
|
|
@ -56,7 +56,19 @@ insert into t1 values(NULL), (compress('a'));
|
|||
select uncompress(a), uncompressed_length(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
# Bug #23254: problem with compress(NULL)
|
||||
#
|
||||
|
||||
create table t1(a blob);
|
||||
insert into t1 values ('0'), (NULL), ('0');
|
||||
--disable_result_log
|
||||
select compress(a), compress(a) from t1;
|
||||
--enable_result_log
|
||||
select compress(a) is null from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug #18539: uncompress(d) is null: impossible?
|
||||
|
|
|
@ -2965,6 +2965,7 @@ String *Item_func_compress::val_str(String *str)
|
|||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
null_value= 0;
|
||||
if (res->is_empty()) return res;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue