mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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
@ -79,3 +79,13 @@ 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
|
||||
|
Reference in New Issue
Block a user