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 /mysql-test/t/func_compress.test | |
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 'mysql-test/t/func_compress.test')
-rw-r--r-- | mysql-test/t/func_compress.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test index 0f3c3cab307..223a5540f38 100644 --- a/mysql-test/t/func_compress.test +++ b/mysql-test/t/func_compress.test @@ -54,4 +54,16 @@ insert into t1 values(NULL), (compress('a')); select uncompress(a), uncompressed_length(a) from t1; drop table t1; -# End of 4.1 tests +# +# Bug #23254: problem with compress(NULL) +# + +create table t1(a blob); +insert into t1 values ('0'), (NULL), ('0'); +--disable_result_log +select compress(a), compress(a) from t1; +--enable_result_log +select compress(a) is null from t1; +drop table t1; + +--echo End of 4.1 tests |