diff options
Diffstat (limited to 'sql/ha_ndbcluster_cond.cc')
-rw-r--r-- | sql/ha_ndbcluster_cond.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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()) { |