diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2007-09-13 09:47:21 +0200 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2007-09-13 09:47:21 +0200 |
commit | eacd5ec43ce3671e14f00558dbbba2df8539a7bf (patch) | |
tree | 3cecdb7a2670d6993ad513b992aec96e39f12e3c /sql/ha_ndbcluster_cond.cc | |
parent | b76fd3ed3bdcdfa58ab1c1f9afbf844bd296e4da (diff) | |
download | mariadb-git-eacd5ec43ce3671e14f00558dbbba2df8539a7bf.tar.gz |
bug#27494 An invalid subselect crashes mysql server: Added check for missing arguments
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()) { |