diff options
author | unknown <sergefp@mysql.com> | 2006-07-21 23:45:34 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-07-21 23:45:34 +0400 |
commit | c13be2300407352b48ccb40825e483b53a66077f (patch) | |
tree | bb317a1f7fb57b1b8e6b71bbf1d93f5d1c912294 /sql/item_cmpfunc.cc | |
parent | f57bb34775c7482e15a6d067873730f9434726e8 (diff) | |
parent | 68698c04abfbcbee1b67b5daca6695ada679ac4f (diff) | |
download | mariadb-git-c13be2300407352b48ccb40825e483b53a66077f.tar.gz |
Merge mysql.com:/home/psergey/mysql-4.1-opt
into mysql.com:/home/psergey/mysql-5.0-opt
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/subselect.test:
Manual merge
sql/mysql_priv.h:
Manual merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 98453899375..34170124cd7 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -3656,6 +3656,28 @@ Item *Item_cond_or::neg_transformer(THD *thd) /* NOT(a OR b OR ...) -> */ } +Item *Item_func_nop_all::neg_transformer(THD *thd) +{ + /* "NOT (e $cmp$ ANY (SELECT ...)) -> e $rev_cmp$" ALL (SELECT ...) */ + Item_func_not_all *new_item= new Item_func_not_all(args[0]); + Item_allany_subselect *allany= (Item_allany_subselect*)args[0]; + allany->func= allany->func_creator(FALSE); + allany->all= !allany->all; + allany->upper_item= new_item; + return new_item; +} + +Item *Item_func_not_all::neg_transformer(THD *thd) +{ + /* "NOT (e $cmp$ ALL (SELECT ...)) -> e $rev_cmp$" ANY (SELECT ...) */ + Item_func_nop_all *new_item= new Item_func_nop_all(args[0]); + Item_allany_subselect *allany= (Item_allany_subselect*)args[0]; + allany->all= !allany->all; + allany->func= allany->func_creator(TRUE); + allany->upper_item= new_item; + return new_item; +} + Item *Item_func_eq::negated_item() /* a = b -> a != b */ { return new Item_func_ne(args[0], args[1]); |