From ef60c96f8bb7c8ab0c044750b39f56f1eb1953ea Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 Feb 2007 16:31:12 +0100 Subject: [PATCH] bug #26225 Engine condition pushdown doesn't work with prepare statements (ps_7ndb): ensure that query plan for prepared statement is analyzed correctly --- sql/ha_ndbcluster.cc | 2 +- sql/item_func.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 514d4b83a04..d1d3484d432 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -7058,7 +7058,7 @@ void ndb_serialize_cond(const Item *item, void *arg) Check that the field is part of the table of the handler instance and that we expect a field with of this result type. */ - if (context->table == field->table) + if (context->table->s == field->table->s) { const NDBTAB *tab= (const NDBTAB *) context->ndb_table; DBUG_PRINT("info", ("FIELD_ITEM")); diff --git a/sql/item_func.cc b/sql/item_func.cc index a294bbd7a71..0866e927fef 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -231,6 +231,8 @@ void Item_func::traverse_cond(Cond_traverser traverser, (*traverser)(this, argument); } } + else + (*traverser)(this, argument); }