diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-13 19:05:54 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-13 19:05:54 +0500 |
commit | 60a21d16975de436d57c9e29f237234b71fd5601 (patch) | |
tree | 0170e1ae102bd9bae909c42003f5bb013fb6b058 /sql | |
parent | e203f0e578a064bee54d600b2c70424b9f9c9365 (diff) | |
download | mariadb-git-60a21d16975de436d57c9e29f237234b71fd5601.tar.gz |
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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_strfunc.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 98888226e58..f7408cb5e9f 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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; /* |