Commit 79ad6ff2 authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com
Browse files

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

parent 8a08ac40
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -260,7 +260,23 @@ class Ndb_cond : public Sql_alloc
  { 
    if (ndb_item) delete ndb_item; 
    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; 
  };
  Ndb_item *ndb_item;