mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02: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. mysql-test/r/func_compress.result: Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item return NULL - test result. mysql-test/t/func_compress.test: Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item return NULL - test case. sql/item_strfunc.cc: Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item return NULL - set null_value.
This commit is contained in:
parent
e203f0e578
commit
60a21d1697
3 changed files with 24 additions and 1 deletions
|
|
@ -2838,6 +2838,7 @@ String *Item_func_compress::val_str(String *str)
|
|||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
null_value= 0;
|
||||
if (res->is_empty()) return res;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue