From eacd5ec43ce3671e14f00558dbbba2df8539a7bf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Sep 2007 09:47:21 +0200 Subject: bug#27494 An invalid subselect crashes mysql server: Added check for missing arguments --- sql/ha_ndbcluster_cond.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index a0eaccb68d8..ea3f8a7683a 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -46,6 +46,14 @@ void ndb_serialize_cond(const Item *item, void *arg) // Check if we are skipping arguments to a function to be evaluated if (context->skip) { + if (!item) + { + DBUG_PRINT("info", ("Unexpected mismatch of found and expected number of function arguments %u", context->skip)); + sql_print_error("ndb_serialize_cond: Unexpected mismatch of found and " + "expected number of function arguments %u", context->skip); + context->skip= 0; + DBUG_VOID_RETURN; + } DBUG_PRINT("info", ("Skiping argument %d", context->skip)); context->skip--; switch (item->type()) { -- cgit v1.2.1