diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2006-09-05 17:07:00 +0200 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2006-09-05 17:07:00 +0200 |
commit | 96fe6b0ffbcdeccb9946f5c4c859989a0c0689d9 (patch) | |
tree | ff9cd6c538af3a1d2f1d0a998f82d25e2a312d63 /sql/ha_ndbcluster.h | |
parent | 44c386de1db7e244a777d46fe34df44c5ac81115 (diff) | |
download | mariadb-git-96fe6b0ffbcdeccb9946f5c4c859989a0c0689d9.tar.gz |
Bug #21056 ndb pushdown equal/setValue error on datetime: only pushdown like of string type fields
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r-- | sql/ha_ndbcluster.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index cfb12981b98..1e08e04198c 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -362,8 +362,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; @@ -375,6 +375,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) { @@ -394,6 +395,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); @@ -429,6 +452,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; |