Commit 9f50c2ff authored by unknown's avatar unknown

Fixed handling of condition pushdown to storage engine of NO BETWEEN and NOT IN

parent e045e7ac
This diff is collapsed.
This diff is collapsed.
...@@ -7232,8 +7232,10 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter) ...@@ -7232,8 +7232,10 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
break; break;
} }
case(Item_func::NOT_FUNC): { case(Item_func::NOT_FUNC): {
DBUG_PRINT("info", ("Generating negated query"));
cond= cond->next; cond= cond->next;
negated= TRUE; negated= TRUE;
break; break;
} }
default: default:
...@@ -7249,12 +7251,14 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter) ...@@ -7249,12 +7251,14 @@ ha_ndbcluster::build_scan_filter_group(Ndb_cond* &cond, NdbScanFilter *filter)
if (cond) cond= cond->next; if (cond) cond= cond->next;
if (filter->end() == -1) if (filter->end() == -1)
DBUG_RETURN(1); DBUG_RETURN(1);
if (!negated)
break; break;
// else fall through (NOT END is an illegal condition)
default: { default: {
DBUG_PRINT("info", ("Illegal scan filter")); DBUG_PRINT("info", ("Illegal scan filter"));
} }
} }
} while (level > 0); } while (level > 0 || negated);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -7296,6 +7300,7 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack, ...@@ -7296,6 +7300,7 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack,
DBUG_ENTER("generate_scan_filter"); DBUG_ENTER("generate_scan_filter");
if (ndb_cond_stack) if (ndb_cond_stack)
{ {
DBUG_PRINT("info", ("Generating scan filter"));
NdbScanFilter filter(op); NdbScanFilter filter(op);
bool multiple_cond= FALSE; bool multiple_cond= FALSE;
// Wrap an AND group around multiple conditions // Wrap an AND group around multiple conditions
......
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