diff options
author | unknown <igor@rurik.mysql.com> | 2004-11-10 11:24:03 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2004-11-10 11:24:03 -0800 |
commit | 971660bec5ff29fc54956d3e7f42e951e0549bac (patch) | |
tree | 82453ba22e582b718664fa6945249371773611ec /sql | |
parent | 4b5901eda8653332b1c590fef004c78846c7794d (diff) | |
parent | 2ef4c97e9daed004ae4d60ea6e71b31b1f230ad1 (diff) | |
download | mariadb-git-971660bec5ff29fc54956d3e7f42e951e0549bac.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4049766c501..93b46ec874d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6645,10 +6645,7 @@ static Item *eliminate_item_equal(COND *cond, COND_EQUAL *upper_levels, List<Item> eq_list; Item_func_eq *eq_item= 0; if (((Item *) item_equal)->const_item() && !item_equal->val_int()) - { - cond= new Item_int((char*) "FALSE",0,1); - return cond; - } + return new Item_int((longlong) 0,1); Item *item_const= item_equal->get_const(); Item_equal_iterator it(*item_equal); Item *head; @@ -6691,9 +6688,14 @@ static Item *eliminate_item_equal(COND *cond, COND_EQUAL *upper_levels, } if (!cond && !eq_list.head()) + { + if (!eq_item) + return new Item_int((longlong) 1,1); return eq_item; + } - eq_list.push_back(eq_item); + if (eq_item) + eq_list.push_back(eq_item); if (!cond) cond= new Item_cond_and(eq_list); else |