mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item return NULL
We don't set null_value to 0 in the Item_func_compress::val_str() for not-NULL results.
This commit is contained in:
parent
2db82814c4
commit
31402835d4
@@ -54,4 +54,16 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user