From: Date: April 13 2006 1:19pm Subject: bk commit into 4.1 tree (ramil:1.2504) BUG#18643 List-Archive: http://lists.mysql.com/commits/4914 X-Bug: 18643 Message-Id: <200604131119.k3DBJQ3K038630@myoffice.izhnet.ru> 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 1.2504 06/04/13 16:19:21 ramil@stripped +3 -0 Fix for bug #18643: crazy UNCOMPRESS(). sql/item_strfunc.cc 1.240 06/04/13 16:19:16 ramil@stripped +1 -0 Fix for bug #18643: crazy UNCOMPRESS(). - set null_value. mysql-test/t/func_compress.test 1.12 06/04/13 16:19:16 ramil@stripped +9 -0 Fix for bug #18643: crazy UNCOMPRESS(). - test-case mysql-test/r/func_compress.result 1.16 06/04/13 16:19:16 ramil@stripped +7 -0 Fix for bug #18643: crazy UNCOMPRESS(). - test-case # 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/mysql-4.1 --- 1.239/sql/item_strfunc.cc 2006-01-11 18:31:45 +04:00 +++ 1.240/sql/item_strfunc.cc 2006-04-13 16:19:16 +05:00 @@ -2850,6 +2850,7 @@ String *Item_func_uncompress::val_str(St if (!res) goto err; + null_value= 0; if (res->is_empty()) return res; --- 1.15/mysql-test/r/func_compress.result 2004-11-28 19:31:09 +04:00 +++ 1.16/mysql-test/r/func_compress.result 2006-04-13 16:19:16 +05:00 @@ -72,3 +72,10 @@ set @@max_allowed_packet=1048576*100; select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null; compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null 0 +create table t1(a blob); +insert into t1 values(NULL), (compress('a')); +select uncompress(a), uncompressed_length(a) from t1; +uncompress(a) uncompressed_length(a) +NULL NULL +a 1 +drop table t1; --- 1.11/mysql-test/t/func_compress.test 2005-07-28 05:21:41 +05:00 +++ 1.12/mysql-test/t/func_compress.test 2006-04-13 16:19:16 +05:00 @@ -45,4 +45,13 @@ set @@max_allowed_packet=1048576*100; --replace_result "''" XXX "'1'" XXX eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null; +# +# Bug #18643: problem with null values +# + +create table t1(a blob); +insert into t1 values(NULL), (compress('a')); +select uncompress(a), uncompressed_length(a) from t1; +drop table t1; + # End of 4.1 tests