diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-06-19 12:14:46 +0200 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-06-19 12:14:46 +0200 |
commit | 7d74c33dd9803c3594d402c32c06aded5bf93cc4 (patch) | |
tree | de7a5f4c4b2be6baba921d04a6d79209b7d32ec2 /sql/ha_ndbcluster_cond.h | |
parent | e41a27b9e007c03da5f96746a655468c1ef8ccb4 (diff) | |
parent | 228fc721a9d4ef572d6ae9a53736a2adc5106e47 (diff) | |
download | mariadb-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.h | 20 |
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; |