summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.h
diff options
context:
space:
mode:
authorunknown <mskold/marty@linux.site>2006-09-06 11:21:49 +0200
committerunknown <mskold/marty@linux.site>2006-09-06 11:21:49 +0200
commit431a67376ea1fe1b180ff39b467803b51945e34c (patch)
tree68c2739e2f358e9fe7ad60a50dfe9b2e031fd37b /sql/ha_ndbcluster.h
parenteb9d5675d49ee2582d80d8b6b29a669c65df5574 (diff)
parent545c9b8fdecad04d6b5acaaa1400ca8be7a7066c (diff)
downloadmariadb-git-431a67376ea1fe1b180ff39b467803b51945e34c.tar.gz
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1 mysql-test/r/ndb_condition_pushdown.result: Auto merged mysql-test/t/ndb_condition_pushdown.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r--sql/ha_ndbcluster.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index 787e9befeb3..4301eaad79c 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -461,8 +461,8 @@ class Ndb_cond_traverse_context
Ndb_cond_traverse_context(TABLE *tab, void* ndb_tab, Ndb_cond_stack* stack)
: table(tab), ndb_table(ndb_tab),
supported(TRUE), stack_ptr(stack), cond_ptr(NULL),
- expect_mask(0), expect_field_result_mask(0), skip(0), collation(NULL),
- rewrite_stack(NULL)
+ expect_mask(0), expect_field_type_mask(0), expect_field_result_mask(0),
+ skip(0), collation(NULL), rewrite_stack(NULL)
{
if (stack)
cond_ptr= stack->ndb_cond;
@@ -474,6 +474,7 @@ class Ndb_cond_traverse_context
void expect(Item::Type type)
{
expect_mask|= (1 << type);
+ if (type == Item::FIELD_ITEM) expect_all_field_types();
};
void dont_expect(Item::Type type)
{
@@ -493,6 +494,28 @@ class Ndb_cond_traverse_context
expect(type);
};
+ void expect_field_type(enum_field_types result)
+ {
+ expect_field_type_mask|= (1 << result);
+ };
+ void expect_all_field_types()
+ {
+ expect_field_type_mask= ~0;
+ };
+ bool expecting_field_type(enum_field_types result)
+ {
+ return (expect_field_type_mask & (1 << result));
+ };
+ void expect_no_field_type()
+ {
+ expect_field_type_mask= 0;
+ };
+ void expect_only_field_type(enum_field_types result)
+ {
+ expect_field_type_mask= 0;
+ expect_field_type(result);
+ };
+
void expect_field_result(Item_result result)
{
expect_field_result_mask|= (1 << result);
@@ -528,6 +551,7 @@ class Ndb_cond_traverse_context
Ndb_cond_stack* stack_ptr;
Ndb_cond* cond_ptr;
uint expect_mask;
+ uint expect_field_type_mask;
uint expect_field_result_mask;
uint skip;
CHARSET_INFO* collation;