From: Date: November 27 2006 5:12pm Subject: bk commit into 5.0 tree (kaa:1.2334) BUG#24261 List-Archive: http://lists.mysql.com/commits/15858 X-Bug: 24261 Message-Id: <20061127161217.AE08517A1C8@polly.local> Below is the list of changes that have just been committed into a local 5.0 repository of kaa. When kaa 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-11-27 19:12:10+03:00, kaa@stripped +3 -0 Fix for bug #24261 "crash when WHERE contains NOT IN ('') for unsigned column type" When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL mysql-test/r/func_in.result@stripped, 2006-11-27 19:12:07+03:00, kaa@stripped +4 -0 Added testcase for bug #24261 "crash when WHERE contains NOT IN ('') for unsigned column type" mysql-test/t/func_in.test@stripped, 2006-11-27 19:12:07+03:00, kaa@stripped +7 -0 Added testcase for bug #24261 "crash when WHERE contains NOT IN ('') for unsigned column type" sql/opt_range.cc@stripped, 2006-11-27 19:12:07+03:00, kaa@stripped +2 -1 When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL # 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: kaa # Host: polly.local # Root: /tmp/maint/bug24261/my50-bug24261 --- 1.231/sql/opt_range.cc 2006-11-27 19:12:17 +03:00 +++ 1.232/sql/opt_range.cc 2006-11-27 19:12:17 +03:00 @@ -3703,7 +3703,8 @@ static SEL_TREE *get_func_mm_tree(PARAM for (uint idx= 0; idx < param->keys; idx++) { SEL_ARG *new_interval, *last_val; - if (((new_interval= tree2->keys[idx])) && + if (((new_interval= tree2->keys[idx])) && + (tree->keys[idx]) && ((last_val= tree->keys[idx]->last()))) { new_interval->min_value= last_val->max_value; --- 1.28/mysql-test/r/func_in.result 2006-11-27 19:12:17 +03:00 +++ 1.29/mysql-test/r/func_in.result 2006-11-27 19:12:17 +03:00 @@ -342,4 +342,8 @@ select some_id from t1 where some_id not some_id 1 2 +select some_id from t1 where some_id not in('-1', '0'); +some_id +1 +2 drop table t1; --- 1.22/mysql-test/t/func_in.test 2006-11-27 19:12:17 +03:00 +++ 1.23/mysql-test/t/func_in.test 2006-11-27 19:12:17 +03:00 @@ -231,4 +231,11 @@ insert into t1 values (1),(2); select some_id from t1 where some_id not in(2,-1); select some_id from t1 where some_id not in(-4,-1,-4); select some_id from t1 where some_id not in(-4,-1,3423534,2342342); + +# +# BUG#24261: crash when WHERE contains NOT IN ('') for unsigned column type +# + +select some_id from t1 where some_id not in('-1', '0'); + drop table t1;