summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2007-02-09 16:31:12 +0100
committerunknown <mskold/marty@mysql.com/linux.site>2007-02-09 16:31:12 +0100
commitef60c96f8bb7c8ab0c044750b39f56f1eb1953ea (patch)
tree33c36c0abb4f8dd159dbb3aa9564aadaaf7061de
parentc8f470eaa6e09f674f1d5fe17a7bb5e582431055 (diff)
downloadmariadb-git-ef60c96f8bb7c8ab0c044750b39f56f1eb1953ea.tar.gz
bug #26225 Engine condition pushdown doesn't work with prepare statements (ps_7ndb): ensure that query plan for prepared statement is analyzed correctly
-rw-r--r--sql/ha_ndbcluster.cc2
-rw-r--r--sql/item_func.cc2
2 files changed, 3 insertions, 1 deletions
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);
}