Commit 9656eabf authored by unknown's avatar unknown

Fixed nested conditions for condition pushdown to storage engine

parent 2a203aca
This diff is collapsed.
...@@ -64,7 +64,8 @@ typedef struct st_ndbcluster_share { ...@@ -64,7 +64,8 @@ typedef struct st_ndbcluster_share {
typedef enum ndb_item_type { typedef enum ndb_item_type {
NDB_VALUE = 0, // Qualified more with Item::Type NDB_VALUE = 0, // Qualified more with Item::Type
NDB_FIELD = 1, // Qualified from table definition NDB_FIELD = 1, // Qualified from table definition
NDB_FUNCTION = 2 // Qualified from Item_func::Functype NDB_FUNCTION = 2,// Qualified from Item_func::Functype
NDB_END_COND = 3 // End marker for condition group
} NDB_ITEM_TYPE; } NDB_ITEM_TYPE;
typedef union ndb_item_qualification { typedef union ndb_item_qualification {
...@@ -93,12 +94,12 @@ typedef union ndb_item_value { ...@@ -93,12 +94,12 @@ typedef union ndb_item_value {
class Ndb_item { class Ndb_item {
public: public:
Ndb_item(NDB_ITEM_TYPE item_type);
Ndb_item(NDB_ITEM_TYPE item_type, Ndb_item(NDB_ITEM_TYPE item_type,
NDB_ITEM_QUALIFICATION item_qualification, NDB_ITEM_QUALIFICATION item_qualification,
const Item *item_value); const Item *item_value);
Ndb_item(longlong int_value); Ndb_item(longlong int_value);
Ndb_item(double real_value); Ndb_item(double real_value);
Ndb_item();
Ndb_item(Field *field, int column_no); Ndb_item(Field *field, int column_no);
Ndb_item(Item_func::Functype func_type); Ndb_item(Item_func::Functype func_type);
~Ndb_item(); ~Ndb_item();
...@@ -376,13 +377,13 @@ class ha_ndbcluster: public handler ...@@ -376,13 +377,13 @@ class ha_ndbcluster: public handler
*/ */
void cond_clear(); void cond_clear();
bool serialize_cond(const COND *cond, Ndb_cond_stack *ndb_cond); bool serialize_cond(const COND *cond, Ndb_cond_stack *ndb_cond);
Ndb_cond * build_scan_filter_predicate(Ndb_cond* cond, int build_scan_filter_predicate(Ndb_cond* &cond,
NdbScanFilter* filter); NdbScanFilter* filter);
Ndb_cond * build_scan_filter_group(Ndb_cond* cond, int build_scan_filter_group(Ndb_cond* &cond,
NdbScanFilter* filter); NdbScanFilter* filter);
void build_scan_filter(Ndb_cond* cond, NdbScanFilter* filter); int build_scan_filter(Ndb_cond* &cond, NdbScanFilter* filter);
void generate_scan_filter(Ndb_cond_stack* cond_stack, int generate_scan_filter(Ndb_cond_stack* cond_stack,
NdbScanOperation* op); NdbScanOperation* op);
friend int execute_commit(ha_ndbcluster*, NdbTransaction*); friend int execute_commit(ha_ndbcluster*, NdbTransaction*);
friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*); friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*);
......
...@@ -2086,6 +2086,7 @@ void Item_cond::traverse_cond(Item_cond_traverser traverser, ...@@ -2086,6 +2086,7 @@ void Item_cond::traverse_cond(Item_cond_traverser traverser,
{ {
item->traverse_cond(traverser, arg, order); item->traverse_cond(traverser, arg, order);
} }
(*traverser)(NULL, arg);
break; break;
case(POSTFIX): case(POSTFIX):
while ((item= li++)) while ((item= li++))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment