summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_cond.cc
diff options
context:
space:
mode:
authormskold/marty@mysql.com/linux.site <>2007-09-13 09:47:21 +0200
committermskold/marty@mysql.com/linux.site <>2007-09-13 09:47:21 +0200
commit44b6c2edadbc413ce8db588a6c7d18c080c9b70e (patch)
tree3cecdb7a2670d6993ad513b992aec96e39f12e3c /sql/ha_ndbcluster_cond.cc
parent822fd77ab2d8240815e633efe24cd05c0e25dc1a (diff)
downloadmariadb-git-44b6c2edadbc413ce8db588a6c7d18c080c9b70e.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.cc8
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()) {