summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-16 08:19:20 -0700
committerunknown <igor@rurik.mysql.com>2005-07-16 08:19:20 -0700
commite2bd74015c5cda61912b265c408471ef6a4293d2 (patch)
treea5c1d0f3c03176cf88739d5d3fb73d6b9a21f29c /sql
parent7bdc4dd0a1fb5f4140aeb00a3e6582395fd9a516 (diff)
downloadmariadb-git-e2bd74015c5cda61912b265c408471ef6a4293d2.tar.gz
opt_range.cc:
Fixed bug #11853. Corrected the code of the range optimization for NOT IN and NOT BETWEEN. range.test, range.result: Fixed bug #11853. mysql-test/t/range.test: Fixed bug #11853. sql/opt_range.cc: Fixed bug #11853. Corrected the code of the range optimization for NOT IN and NOT BETWEEN.
Diffstat (limited to 'sql')
-rw-r--r--sql/opt_range.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index c2760b08b6e..676f8d8a33d 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3531,7 +3531,8 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
if (arg->type() != Item::FUNC_ITEM)
DBUG_RETURN(0);
cond_func= (Item_func*) arg;
- if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE)
+ if (cond_func->functype() != Item_func::BETWEEN &&
+ cond_func->functype() != Item_func::IN_FUNC)
DBUG_RETURN(0);
inv= TRUE;
}