From 2e758a7c23fda7fada49d0cca547680cf26cafad Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Nov 2006 19:12:10 +0300 Subject: 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: Added testcase for bug #24261 "crash when WHERE contains NOT IN ('') for unsigned column type" mysql-test/t/func_in.test: Added testcase for bug #24261 "crash when WHERE contains NOT IN ('') for unsigned column type" sql/opt_range.cc: 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/t/func_in.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/t/func_in.test') diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 8ddf1fbe314..0153da12b53 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -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; -- cgit v1.2.1