summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authormalff/marcsql@weblab.(none) <>2007-08-30 17:23:40 -0600
committermalff/marcsql@weblab.(none) <>2007-08-30 17:23:40 -0600
commitca2b2585a5debe6c2ca6f0fb9c48d5c107fe09cf (patch)
tree00bcf2b19fee762a68dc643dafacd013f9bf9e3a /sql/item_cmpfunc.h
parent0670af9479fe8ee946f50a25b5955fc2a6aa0182 (diff)
parent1180c22aef303d85926acba398500c6abbd5d0cb (diff)
downloadmariadb-git-ca2b2585a5debe6c2ca6f0fb9c48d5c107fe09cf.tar.gz
Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 7b6eaef08ec..8410c66b034 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1361,6 +1361,7 @@ public:
Item_cond(List<Item> &nlist)
:Item_bool_func(), list(nlist), abort_on_null(0) {}
bool add(Item *item) { return list.push_back(item); }
+ bool add_at_head(Item *item) { return list.push_front(item); }
void add_at_head(List<Item> *nlist) { list.prepand(nlist); }
bool fix_fields(THD *, Item **ref);
@@ -1553,6 +1554,15 @@ public:
Item *neg_transformer(THD *thd);
};
+inline bool is_cond_and(Item *item)
+{
+ if (item->type() != Item::COND_ITEM)
+ return FALSE;
+
+ Item_cond *cond_item= (Item_cond*) item;
+ return (cond_item->functype() == Item_func::COND_AND_FUNC);
+}
+
class Item_cond_or :public Item_cond
{
public:
@@ -1574,6 +1584,14 @@ public:
Item *neg_transformer(THD *thd);
};
+inline bool is_cond_or(Item *item)
+{
+ if (item->type() != Item::COND_ITEM)
+ return FALSE;
+
+ Item_cond *cond_item= (Item_cond*) item;
+ return (cond_item->functype() == Item_func::COND_OR_FUNC);
+}
/*
XOR is Item_cond, not an Item_int_func because we could like to