Commit eacd5ec4 authored by unknown's avatar unknown

bug#27494 An invalid subselect crashes mysql server: Added check for missing arguments

parent b76fd3ed
...@@ -46,6 +46,14 @@ void ndb_serialize_cond(const Item *item, void *arg) ...@@ -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 // Check if we are skipping arguments to a function to be evaluated
if (context->skip) 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)); DBUG_PRINT("info", ("Skiping argument %d", context->skip));
context->skip--; context->skip--;
switch (item->type()) { switch (item->type()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment