summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_cond.h
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-19 12:14:46 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-19 12:14:46 +0200
commit7d74c33dd9803c3594d402c32c06aded5bf93cc4 (patch)
treede7a5f4c4b2be6baba921d04a6d79209b7d32ec2 /sql/ha_ndbcluster_cond.h
parente41a27b9e007c03da5f96746a655468c1ef8ccb4 (diff)
parent228fc721a9d4ef572d6ae9a53736a2adc5106e47 (diff)
downloadmariadb-git-7d74c33dd9803c3594d402c32c06aded5bf93cc4.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb sql/ha_ndbcluster_cond.h: Auto merged
Diffstat (limited to 'sql/ha_ndbcluster_cond.h')
-rw-r--r--sql/ha_ndbcluster_cond.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_cond.h b/sql/ha_ndbcluster_cond.h
index 617302107d8..143bd5408eb 100644
--- a/sql/ha_ndbcluster_cond.h
+++ b/sql/ha_ndbcluster_cond.h
@@ -264,8 +264,24 @@ 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
+ */
+ 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;