summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.mysql.com>2007-03-09 10:21:11 +0700
committerunknown <tomas@poseidon.mysql.com>2007-03-09 10:21:11 +0700
commitb76fb8f72ed184e6da1f299fef9dbf7bb641cf8f (patch)
tree7a4a8782172c9d12bd6e9ea02cad0e0f07c85f1d /storage
parent690b46cfe2d9035b5faad8c75830752bd7185181 (diff)
downloadmariadb-git-b76fb8f72ed184e6da1f299fef9dbf7bb641cf8f.tar.gz
BUG#25743 If undo_buffer_size (for LG) greater than the inital shared memory (default 20M), ndbd nodes are crashed
storage/ndb/src/kernel/vm/Pool.hpp: Only when m_pool.seize() return true, the ptr.i and ptr.p is assigned the ri ght value, or else the parameter ptr should be "not touched"
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/kernel/vm/Pool.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/ndb/src/kernel/vm/Pool.hpp b/storage/ndb/src/kernel/vm/Pool.hpp
index b585af57684..a4e062078fb 100644
--- a/storage/ndb/src/kernel/vm/Pool.hpp
+++ b/storage/ndb/src/kernel/vm/Pool.hpp
@@ -307,8 +307,11 @@ RecordPool<T, P>::seize(Ptr<T> & ptr)
{
Ptr<void> tmp;
bool ret = m_pool.seize(tmp);
- ptr.i = tmp.i;
- ptr.p = static_cast<T*>(tmp.p);
+ if(likely(ret))
+ {
+ ptr.i = tmp.i;
+ ptr.p = static_cast<T*>(tmp.p);
+ }
return ret;
}