Commit 32c328c5 authored by unknown's avatar unknown

Bug #29185 Large IN list crashes mysqld with cluster and condition pushdown

parent 60a6e9d8
...@@ -260,7 +260,23 @@ class Ndb_cond : public Sql_alloc ...@@ -260,7 +260,23 @@ class Ndb_cond : public Sql_alloc
{ {
if (ndb_item) delete ndb_item; if (ndb_item) delete ndb_item;
ndb_item= NULL; ndb_item= NULL;
if (next) delete next; /*
First item in the linked list deletes all in a loop
Note - doing it recursively causes stack issues for
big IN clauses
*/
if (prev != NULL)
{
next= prev= NULL;
return;
}
Ndb_cond *n= next;
while (n)
{
Ndb_cond *tmp= n;
n= n->next;
delete tmp;
}
next= prev= NULL; next= prev= NULL;
}; };
Ndb_item *ndb_item; Ndb_item *ndb_item;
......
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