summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorjonas@perch.ndb.mysql.com <>2006-03-24 09:42:10 +0100
committerjonas@perch.ndb.mysql.com <>2006-03-24 09:42:10 +0100
commit4164c2a0e0d518e3b524e7ec9b49867a5a1fac18 (patch)
tree846b77a6c7f8933192706df002a704c3a66c5f24 /storage
parentae1bb1bd09a2daf6e00f87034a9be4f4b5d58e55 (diff)
downloadmariadb-git-4164c2a0e0d518e3b524e7ec9b49867a5a1fac18.tar.gz
ndb - bug#18295
rewrite/clean up code a bit to avoid a gcc4 compiler bug
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/kernel/vm/DLFifoList.hpp15
-rw-r--r--storage/ndb/src/kernel/vm/DLList.hpp10
-rw-r--r--storage/ndb/src/kernel/vm/SLList.hpp10
3 files changed, 20 insertions, 15 deletions
diff --git a/storage/ndb/src/kernel/vm/DLFifoList.hpp b/storage/ndb/src/kernel/vm/DLFifoList.hpp
index 2a10c0303ea..ff833aa5723 100644
--- a/storage/ndb/src/kernel/vm/DLFifoList.hpp
+++ b/storage/ndb/src/kernel/vm/DLFifoList.hpp
@@ -312,15 +312,16 @@ inline
void
DLFifoListImpl<P,T,U>::release()
{
- Ptr<T> p;
- while(head.firstItem != RNIL)
+ Ptr<T> ptr;
+ Uint32 curr = head.firstItem;
+ while(curr != RNIL)
{
- p.i = head.firstItem;
- p.p = thePool.getPtr(head.firstItem);
- T * t = p.p;
- head.firstItem = t->U::nextList;
- release(p);
+ thePool.getPtr(ptr, curr);
+ curr = ptr.p->U::nextList;
+ thePool.release(ptr);
}
+ head.firstItem = RNIL;
+ head.lastItem = RNIL;
}
template <typename P, typename T, typename U>
diff --git a/storage/ndb/src/kernel/vm/DLList.hpp b/storage/ndb/src/kernel/vm/DLList.hpp
index 26c660cd582..effc2a1bb1d 100644
--- a/storage/ndb/src/kernel/vm/DLList.hpp
+++ b/storage/ndb/src/kernel/vm/DLList.hpp
@@ -332,13 +332,15 @@ void
DLListImpl<P,T,U>::release()
{
Ptr<T> ptr;
- while((ptr.i = head.firstItem) != RNIL)
+ Uint32 curr = head.firstItem;
+ while(curr != RNIL)
{
- thePool.getPtr(ptr);
- head.firstItem = ptr.p->U::nextList;
+ thePool.getPtr(ptr, curr);
+ curr = ptr.p->U::nextList;
thePool.release(ptr);
}
-}
+ head.firstItem = RNIL;
+}
template <typename P, typename T, typename U>
inline
diff --git a/storage/ndb/src/kernel/vm/SLList.hpp b/storage/ndb/src/kernel/vm/SLList.hpp
index 5fabe981edd..35845612677 100644
--- a/storage/ndb/src/kernel/vm/SLList.hpp
+++ b/storage/ndb/src/kernel/vm/SLList.hpp
@@ -302,13 +302,15 @@ void
SLListImpl<P, T, U>::release()
{
Ptr<T> ptr;
- while((ptr.i = head.firstItem) != RNIL)
+ Uint32 curr = head.firstItem;
+ while(curr != RNIL)
{
- thePool.getPtr(ptr);
- head.firstItem = ptr.p->U::nextList;
+ thePool.getPtr(ptr, curr);
+ curr = ptr.p->U::nextList;
thePool.release(ptr);
}
-}
+ head.firstItem = RNIL;
+}
template <typename P, typename T, typename U>
inline