diff options
author | unknown <aivanov@mysql.com> | 2005-09-07 17:42:47 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-09-07 17:42:47 +0400 |
commit | 0a61c3abda74efa51bf697dfcaa16d80ff874fcd (patch) | |
tree | 64743edb8ddf0d8122d05a3235e6491d5e051b46 /sql/opt_range.cc | |
parent | 2e883d19cf6d912a891dbac53fe0faf62bb89c7a (diff) | |
download | mariadb-git-0a61c3abda74efa51bf697dfcaa16d80ff874fcd.tar.gz |
join_outer.result, opt_range.cc, item_cmpfunc.cc:
Post merge changes
sql_yacc.yy:
Post merge changes
sql_select.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions (post merge changes).
The function add_key_fields() is modified. There cannot be NOT before
BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
now [NOT]BETWEEN/IN expressions.
sql/item_cmpfunc.cc:
Post merge changes
sql/opt_range.cc:
Post merge changes
sql/sql_select.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions (post merge changes).
The function add_key_fields() is modified. There cannot be NOT before
BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
now [NOT]BETWEEN/IN expressions.
sql/sql_yacc.yy:
Post merge changes.
mysql-test/r/join_outer.result:
Post merge changes
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ecf4b5de1cb..cb250251155 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3524,20 +3524,12 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond) } Item_func *cond_func= (Item_func*) cond; - if (cond_func->functype() == Item_func::NOT_FUNC) - { - /* Optimize NOT BETWEEN and NOT IN */ - Item *arg= cond_func->arguments()[0]; - if (arg->type() != Item::FUNC_ITEM) - DBUG_RETURN(0); - cond_func= (Item_func*) arg; - if (cond_func->functype() != Item_func::BETWEEN && - cond_func->functype() != Item_func::IN_FUNC) - DBUG_RETURN(0); - inv= TRUE; - } + if (cond_func->functype() == Item_func::BETWEEN || + cond_func->functype() == Item_func::IN_FUNC) + inv= ((Item_func_opt_neg *) cond_func)->negated; else if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE) DBUG_RETURN(0); + param->cond= cond; switch (cond_func->functype()) { |