summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-08-22 11:51:03 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-08-22 11:51:03 -0600
commitc34e2c7f13f15929a2260835dbc3cd09aa440652 (patch)
tree8420ade46c2c12aaf7c27efafb3179dac8e886d8 /sql/item_cmpfunc.h
parent7dd4e789586bef5141e1a1d4da4b7efc271708aa (diff)
parent6f052e87bf1dae1b04417f9508d398970c565b2b (diff)
downloadmariadb-git-c34e2c7f13f15929a2260835dbc3cd09aa440652.tar.gz
Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge BUILD/SETUP.sh: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/t/query_cache.test: Auto merged sql/item_cmpfunc.h: Auto merged
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 47914c59b4c..6115ed33adc 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -1425,6 +1425,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);
@@ -1618,6 +1619,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:
@@ -1639,6 +1649,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