summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-10-13 19:05:54 +0500
committerunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-10-13 19:05:54 +0500
commit60a21d16975de436d57c9e29f237234b71fd5601 (patch)
tree0170e1ae102bd9bae909c42003f5bb013fb6b058 /sql
parente203f0e578a064bee54d600b2c70424b9f9c9365 (diff)
downloadmariadb-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.cc1
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;
/*