summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_compress.result
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 /mysql-test/r/func_compress.result
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 'mysql-test/r/func_compress.result')
-rw-r--r--mysql-test/r/func_compress.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result
index 8d6fa9927ce..ed8d66e9327 100644
--- a/mysql-test/r/func_compress.result
+++ b/mysql-test/r/func_compress.result
@@ -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