Below is the list of changes that have just been committed into a local
4.1 repository of ram. When ram does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-13 19:05:54+05:00, ramil@stripped +3 -0
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@stripped, 2006-10-13 19:05:52+05:00, ramil@stripped +10
-0
Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item
return NULL
- test result.
mysql-test/t/func_compress.test@stripped, 2006-10-13 19:05:52+05:00, ramil@stripped +13 -1
Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item
return NULL
- test case.
sql/item_strfunc.cc@stripped, 2006-10-13 19:05:52+05:00, ramil@stripped +1 -0
Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item
return NULL
- set null_value.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ramil
# Host: myoffice.izhnet.ru
# Root: /usr/home/ram/work/bug23254/my41-bug23254
--- 1.251/sql/item_strfunc.cc 2006-10-13 19:05:59 +05:00
+++ 1.252/sql/item_strfunc.cc 2006-10-13 19:05:59 +05:00
@@ -2838,6 +2838,7 @@ String *Item_func_compress::val_str(Stri
null_value= 1;
return 0;
}
+ null_value= 0;
if (res->is_empty()) return res;
/*
--- 1.16/mysql-test/r/func_compress.result 2006-10-13 19:05:59 +05:00
+++ 1.17/mysql-test/r/func_compress.result 2006-10-13 19:05:59 +05:00
@@ -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
--- 1.12/mysql-test/t/func_compress.test 2006-10-13 19:05:59 +05:00
+++ 1.13/mysql-test/t/func_compress.test 2006-10-13 19:05:59 +05:00
@@ -54,4 +54,16 @@ insert into t1 values(NULL), (compress('
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
| Thread |
|---|
| • bk commit into 4.1 tree (ramil:1.2587) BUG#23254 | ramil | 13 Oct |