summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_cond.h
diff options
context:
space:
mode:
authortomas@whalegate.ndb.mysql.com <>2007-06-20 06:26:23 +0200
committertomas@whalegate.ndb.mysql.com <>2007-06-20 06:26:23 +0200
commit3bd4019fadb33d9cd2ac0f48727abf10c0e1fb9b (patch)
tree7a096a4b2eb48e984316caf54952d4d4be4af272 /sql/ha_ndbcluster_cond.h
parent5dd26788cc5d4dbd19917c900ddf554e7463d74a (diff)
parent956b92059b63be7e0b6ba10ed55a9864d0b3e6e8 (diff)
downloadmariadb-git-3bd4019fadb33d9cd2ac0f48727abf10c0e1fb9b.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-rpl
Diffstat (limited to 'sql/ha_ndbcluster_cond.h')
-rw-r--r--sql/ha_ndbcluster_cond.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_cond.h b/sql/ha_ndbcluster_cond.h
index d5b3b913f22..4d1d2ef9f92 100644
--- a/sql/ha_ndbcluster_cond.h
+++ b/sql/ha_ndbcluster_cond.h
@@ -264,8 +264,20 @@ class Ndb_cond : public Sql_alloc
~Ndb_cond()
{
if (ndb_item) delete ndb_item;
- ndb_item= NULL;
- if (next) delete next;
+ ndb_item= NULL;
+ /*
+ First item in the linked list deletes all in a loop
+ Note - doing it recursively causes stack issues for
+ big IN clauses
+ */
+ Ndb_cond *n= next;
+ while (n)
+ {
+ Ndb_cond *tmp= n;
+ n= n->next;
+ tmp->next= NULL;
+ delete tmp;
+ }
next= prev= NULL;
};
Ndb_item *ndb_item;