summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-20 06:26:23 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-20 06:26:23 +0200
commit461a4a8334c9203d27837b34f8233f3c80dfbc63 (patch)
tree7a096a4b2eb48e984316caf54952d4d4be4af272
parentafabda8f649a7956398ea2a9d2dffe77ab544ddf (diff)
parente258e2340b81fb957c4790c44c3f165f0b165328 (diff)
downloadmariadb-git-461a4a8334c9203d27837b34f8233f3c80dfbc63.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 sql/ha_ndbcluster_cond.h: Auto merged
-rw-r--r--sql/ha_ndbcluster_cond.h16
-rw-r--r--storage/ndb/src/kernel/vm/RWPool.cpp2
2 files changed, 15 insertions, 3 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;
diff --git a/storage/ndb/src/kernel/vm/RWPool.cpp b/storage/ndb/src/kernel/vm/RWPool.cpp
index 192a8f87402..056b2149e2a 100644
--- a/storage/ndb/src/kernel/vm/RWPool.cpp
+++ b/storage/ndb/src/kernel/vm/RWPool.cpp
@@ -140,7 +140,7 @@ RWPool::release(Ptr<void> ptr)
Uint32 ff = page->m_first_free;
* (record_ptr + m_record_info.m_offset_next_pool) = ff;
- page->m_first_free = ptr.i;
+ page->m_first_free = ptr.i & POOL_RECORD_MASK;
page->m_ref_count = ref_cnt - 1;
if (ff == REC_NIL)