Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2113 06/02/28 12:56:08 jonas@eel.(none) +8 -0
ndb dd -
create RWPool
update bench_pool
storage/ndb/src/kernel/vm/RWPool.hpp
1.1 06/02/28 12:56:02 jonas@eel.(none) +70 -0
New BitKeeper file ``storage/ndb/src/kernel/vm/RWPool.hpp''
storage/ndb/src/kernel/vm/RWPool.cpp
1.1 06/02/28 12:56:02 jonas@eel.(none) +225 -0
New BitKeeper file ``storage/ndb/src/kernel/vm/RWPool.cpp''
storage/ndb/src/kernel/vm/bench_pool.cpp
1.2 06/02/28 12:56:02 jonas@eel.(none) +215 -71
lots of updates to bench_pool
storage/ndb/src/kernel/vm/WOPool.hpp
1.2 06/02/28 12:56:02 jonas@eel.(none) +1 -2
Fix alignment
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
1.30 06/02/28 12:56:02 jonas@eel.(none) +3 -0
Mave key descriptor
storage/ndb/src/kernel/vm/RWPool.hpp
1.0 06/02/28 12:56:02 jonas@eel.(none) +0 -0
BitKeeper file /home/jonas/src/mysql-5.1-new/storage/ndb/src/kernel/vm/RWPool.hpp
storage/ndb/src/kernel/vm/RWPool.cpp
1.0 06/02/28 12:56:02 jonas@eel.(none) +0 -0
BitKeeper file /home/jonas/src/mysql-5.1-new/storage/ndb/src/kernel/vm/RWPool.cpp
storage/ndb/src/kernel/vm/Pool.hpp
1.5 06/02/28 12:56:02 jonas@eel.(none) +4 -3
Fix release(i)
storage/ndb/src/kernel/vm/Makefile.am
1.17 06/02/28 12:56:02 jonas@eel.(none) +3 -3
Add RWPool
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.80 06/02/28 12:56:02 jonas@eel.(none) +0 -2
move key descriptor
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: eel.(none)
# Root: /home/jonas/src/mysql-5.1-new
--- New file ---
+++ storage/ndb/src/kernel/vm/RWPool.cpp 06/02/28 12:56:02
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "RWPool.hpp"
#include <ndbd_exit_codes.h>
#include <NdbOut.hpp>
#define REC_NIL GLOBAL_PAGE_SIZE_WORDS
RWPool::RWPool()
{
bzero(this, sizeof(* this));
m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
m_current_first_free = REC_NIL;
m_first_free_page = RNIL;
}
void
RWPool::init(const Record_info& ri, const Pool_context& pc)
{
m_ctx = pc;
m_record_info = ri;
m_record_info.m_size = ((ri.m_size + 3) >> 2); // Align to word boundary
m_record_info.m_offset_magic = ((ri.m_offset_magic + 3) >> 2);
m_record_info.m_offset_next_pool = ((ri.m_offset_next_pool + 3) >> 2);
m_memroot = (RWPage*)m_ctx.get_memroot();
}
bool
RWPool::seize(Ptr<void>& ptr)
{
Uint32 pos = m_current_pos;
Uint32 size = m_record_info.m_size;
Uint32 off = m_record_info.m_offset_magic;
RWPage *pageP = m_current_page;
if (likely(m_current_first_free != REC_NIL))
{
seize_free:
pos = m_current_first_free;
ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
ptr.p = pageP->m_data + pos;
pageP->m_data[pos+off] = ~(Uint32)m_record_info.m_type_id;
m_current_ref_count++;
m_current_first_free = pageP->m_data[pos+m_record_info.m_offset_next_pool];
return true;
}
else if (pos + size < GLOBAL_PAGE_SIZE_WORDS)
{
seize_first:
ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
ptr.p = (pageP->m_data + pos);
pageP->m_data[pos+off] = ~(Uint32)m_record_info.m_type_id;
m_current_ref_count++;
m_current_pos = pos + size;
return true;
}
if (m_current_page)
{
m_current_page->m_first_free = REC_NIL;
m_current_page->m_next_page = RNIL;
m_current_page->m_prev_page = RNIL;
m_current_page->m_type_id = m_record_info.m_type_id;
m_current_page->m_ref_count = m_current_ref_count;
}
if (m_first_free_page != RNIL)
{
pageP = m_current_page = m_memroot + m_first_free_page;
m_current_page_no = m_first_free_page;
m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
m_current_first_free = m_current_page->m_first_free;
m_first_free_page = m_current_page->m_next_page;
m_current_ref_count = m_current_page->m_ref_count;
(m_memroot + m_first_free_page)->m_prev_page = RNIL;
goto seize_free;
}
m_current_ref_count = 0;
RWPage* page;
Uint32 page_no = RNIL;
if ((page = (RWPage*)m_ctx.alloc_page(m_record_info.m_type_id, &page_no)))
{
pos = 0;
m_current_page_no = page_no;
pageP = m_current_page = page;
m_current_first_free = REC_NIL;
page->m_type_id = m_record_info.m_type_id;
goto seize_first;
}
m_current_page = 0;
m_current_page_no = RNIL;
m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
m_current_first_free = REC_NIL;
return false;
}
void
RWPool::release(Ptr<void> ptr)
{
Uint32 cur_page = m_current_page_no;
Uint32 ptr_page = ptr.i >> POOL_RECORD_BITS;
Uint32 *record_ptr = (Uint32*)ptr.p;
Uint32 magic_val = * (record_ptr + m_record_info.m_offset_magic);
if (likely(magic_val == ~(Uint32)m_record_info.m_type_id))
{
* (record_ptr + m_record_info.m_offset_magic) = 0;
if (cur_page == ptr_page)
{
* (record_ptr + m_record_info.m_offset_next_pool) = m_current_first_free;
assert(m_current_ref_count);
m_current_ref_count--;
m_current_first_free = ptr.i & POOL_RECORD_MASK;
return;
}
// Cache miss on page...
RWPage* page = m_memroot + ptr_page;
Uint32 ref_cnt = page->m_ref_count;
Uint32 ff = page->m_first_free;
* (record_ptr + m_record_info.m_offset_next_pool) = ff;
page->m_first_free = ptr.i;
page->m_ref_count = ref_cnt - 1;
if (ff == REC_NIL)
{
/**
* It was full...add to free page list
*/
Uint32 ffp = m_first_free_page;
if (ffp != RNIL)
{
RWPage* next = (m_memroot + ffp);
assert(next->m_prev_page == RNIL);
next->m_prev_page = ptr_page;
}
page->m_next_page = ffp;
page->m_prev_page = RNIL;
return;
}
else if(ref_cnt == 1)
{
/**
* It's now empty...release it
*/
Uint32 prev = page->m_prev_page;
Uint32 next = page->m_next_page;
if (prev != RNIL)
{
(m_memroot + prev)->m_next_page = next;
}
else
{
assert(m_first_free_page == ptr_page);
m_first_free_page = next;
}
if (next != RNIL)
{
(m_memroot + next)->m_prev_page = prev;
}
m_ctx.release_page(m_record_info.m_type_id, ptr_page);
return;
}
return;
}
handle_invalid_release(ptr);
}
void
RWPool::handle_invalid_release(Ptr<void> ptr)
{
char buf[255];
Uint32 pos = ptr.i & POOL_RECORD_MASK;
Uint32 pageI = ptr.i >> POOL_RECORD_BITS;
Uint32 * record_ptr_p = (Uint32*)ptr.p;
Uint32 * record_ptr_i = (m_memroot+pageI)->m_data + pos;
Uint32 magic = * (record_ptr_p + m_record_info.m_offset_magic);
snprintf(buf, sizeof(buf),
"Invalid memory release: ptr (%x %p %p) magic: (%.8x %.8x) memroot: %p page: %x",
ptr.i, ptr.p, record_ptr_i, magic, m_record_info.m_type_id,
m_memroot,
(m_memroot+pageI)->m_type_id);
m_ctx.handleAbort(NDBD_EXIT_PRGERR, buf);
}
void
RWPool::handle_invalid_get_ptr(Uint32 ptrI)
{
char buf[255];
Uint32 pos = ptrI & POOL_RECORD_MASK;
Uint32 pageI = ptrI >> POOL_RECORD_BITS;
Uint32 * record_ptr_i = (m_memroot+pageI)->m_data + pos;
Uint32 magic = * (record_ptr_i + m_record_info.m_offset_magic);
snprintf(buf, sizeof(buf),
"Invalid memory access: ptr (%x %p) magic: (%.8x %.8x) memroot: %p page: %x",
ptrI, record_ptr_i, magic, m_record_info.m_type_id,
m_memroot,
(m_memroot+pageI)->m_type_id);
m_ctx.handleAbort(NDBD_EXIT_PRGERR, buf);
}
--- New file ---
+++ storage/ndb/src/kernel/vm/RWPool.hpp 06/02/28 12:56:02
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "Pool.hpp"
struct RWPage
{
Uint32 m_type_id;
Uint16 m_first_free;
Uint16 m_ref_count;
Uint32 m_next_page;
Uint32 m_prev_page;
Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 4];
};
/**
* Read Write Pool
*/
struct RWPool
{
Record_info m_record_info;
RWPage* m_memroot;
RWPage* m_current_page;
Pool_context m_ctx;
Uint32 m_first_free_page;
Uint32 m_current_page_no;
Uint16 m_current_pos;
Uint16 m_current_first_free;
Uint16 m_current_ref_count;
public:
RWPool();
void init(const Record_info& ri, const Pool_context& pc);
bool seize(Ptr<void>&);
void release(Ptr<void>);
void * getPtr(Uint32 i);
private:
void handle_invalid_release(Ptr<void>);
void handle_invalid_get_ptr(Uint32 i);
};
inline
void*
RWPool::getPtr(Uint32 i)
{
Uint32 page_no = i >> POOL_RECORD_BITS;
Uint32 page_idx = i & POOL_RECORD_MASK;
RWPage * page = m_memroot + page_no;
Uint32 * record = page->m_data + page_idx;
Uint32 magic_val = * (record + m_record_info.m_offset_magic);
if (likely(magic_val == ~(Uint32)m_record_info.m_type_id))
{
return record;
}
handle_invalid_get_ptr(i);
}
--- 1.1/storage/ndb/src/kernel/vm/bench_pool.cpp 2006-01-22 18:23:44 +01:00
+++ 1.2/storage/ndb/src/kernel/vm/bench_pool.cpp 2006-02-28 12:56:02 +01:00
@@ -15,13 +15,41 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include "NdbdSuperPool.hpp"
#include "ArrayPool.hpp"
+#include "WOPool.hpp"
+#include "RWPool.hpp"
#include <NdbTick.h>
#include "ndbd_malloc_impl.hpp"
+#include "SimulatedBlock.hpp"
+
+#include <valgrind/callgrind.h>
+
+#define T_TEST_AP (1 << 0)
+#define T_TEST_WO (1 << 1)
+#define T_TEST_RW (1 << 2)
+
+#define T_SEIZE (1 << 1)
+#define T_RELEASE (1 << 2)
+#define T_MIX (1 << 3)
+
+#define T_L_SEIZE (1 << 4)
+#define T_L_RELEASE (1 << 5)
+#define T_L_MIX (1 << 6)
+
+Uint32 tests = ~0;
+Uint32 sizes = 7;
+unsigned int seed;
+Ndbd_mem_manager mm;
+Configuration cfg;
+Block_context ctx = { cfg, mm };
+struct BB : public SimulatedBlock
+{
+ BB(int no, Block_context& ctx) : SimulatedBlock(no, ctx) {}
+};
+
+BB block(DBACC, ctx);
template <typename T>
-inline
void
init(ArrayPool<T> & pool, Uint32 cnt)
{
@@ -29,50 +57,64 @@
}
template <typename T>
-inline
void
-init(RecordPool<T> & pool, Uint32 cnt)
+init(RecordPool<T, WOPool> & pool, Uint32 cnt)
{
+ Pool_context pc;
+ pc.m_block = █
+ pool.wo_pool_init(0x2001, pc);
}
+template <typename T>
+void
+init(RecordPool<T, RWPool> & pool, Uint32 cnt)
+{
+ Pool_context pc;
+ pc.m_block = █
+ pool.init(0x2001, pc);
+}
-template<typename T, typename R>
-inline
+template <typename T, typename R>
void
test_pool(R& pool, Uint32 cnt, Uint32 loops)
{
- init(pool, cnt);
Ptr<T> ptr;
Uint32 *arr = (Uint32*)alloca(cnt * sizeof(Uint32));
+ bzero(arr, cnt * sizeof(Uint32));
{
printf(" ; seize "); fflush(stdout);
Uint64 sum = 0;
for(Uint32 i = 0; i<loops; i++)
{
Uint64 start = NdbTick_CurrentMillisecond();
+ CALLGRIND_TOGGLE_COLLECT();
for(Uint32 j = 0; j<cnt; j++)
{
bool b = pool.seize(ptr);
arr[j] = ptr.i;
+ ptr.p->do_stuff();
assert(b);
}
+ CALLGRIND_TOGGLE_COLLECT();
Uint64 stop = NdbTick_CurrentMillisecond();
for(Uint32 j = 0; j<cnt; j++)
{
ptr.i = arr[j];
- pool.getPtr(ptr);
- pool.release(ptr);
+ pool.release(ptr.i);
arr[j] = RNIL;
}
-
+
sum += (stop - start);
if (i == 0)
+ {
printf("; first ; %lld", (stop - start));
+ fflush(stdout);
+ }
}
printf(" ; avg ; %lld ; tot ; %lld", sum/loops, sum);fflush(stdout);
}
-
+
{
printf(" ; release "); fflush(stdout);
Uint64 sum = 0;
@@ -86,12 +128,15 @@
}
Uint64 start = NdbTick_CurrentMillisecond();
+ CALLGRIND_TOGGLE_COLLECT();
for(Uint32 j = 0; j<cnt; j++)
{
- ptr.i = arr[j];
+ pool.getPtr(ptr, arr[j]);
+ ptr.p->do_stuff();
pool.release(ptr);
arr[j] = RNIL;
}
+ CALLGRIND_TOGGLE_COLLECT();
Uint64 stop = NdbTick_CurrentMillisecond();
sum += (stop - start);
@@ -104,22 +149,27 @@
Uint64 sum = 0;
Uint64 start = NdbTick_CurrentMillisecond();
+ CALLGRIND_TOGGLE_COLLECT();
for(Uint32 i = 0; i<loops * cnt; i++)
{
- int pos = rand() % cnt;
+ int pos = my_rand(&seed) % cnt;
ptr.i = arr[pos];
if (ptr.i == RNIL)
{
pool.seize(ptr);
arr[pos] = ptr.i;
assert(ptr.i != RNIL);
+ ptr.p->do_stuff();
}
else
{
+ pool.getPtr(ptr);
+ ptr.p->do_stuff();
pool.release(ptr);
arr[pos] = RNIL;
}
}
+ CALLGRIND_TOGGLE_COLLECT();
Uint64 stop = NdbTick_CurrentMillisecond();
for(Uint32 j = 0; j<cnt; j++)
@@ -127,8 +177,7 @@
ptr.i = arr[j];
if (ptr.i != RNIL)
{
- pool.getPtr(ptr);
- pool.release(ptr);
+ pool.release(ptr.i);
}
arr[j] = RNIL;
}
@@ -149,19 +198,21 @@
Uint64 sum = 0;
Uint64 start = NdbTick_CurrentMillisecond();
+ CALLGRIND_TOGGLE_COLLECT();
for(Uint32 i = 0; i<loops * cnt; i++)
{
- int pos = rand() % cnt;
+ int pos = my_rand(&seed) % cnt;
ptr.i = arr[pos];
pool.getPtr(ptr);
+ ptr.p->do_stuff();
}
+ CALLGRIND_TOGGLE_COLLECT();
Uint64 stop = NdbTick_CurrentMillisecond();
-
+
for(Uint32 j = 0; j<cnt; j++)
{
ptr.i = arr[j];
- pool.getPtr(ptr);
- pool.release(ptr);
+ pool.release(ptr.i);
arr[j] = RNIL;
}
@@ -171,79 +222,172 @@
ndbout_c("");
}
-template <Uint32 sz> struct Rec { char data[sz-4]; Uint32 nextPool; };
+template <Uint32 sz>
+struct Rec {
+ Uint32 m_data;
+ Uint32 m_magic;
+ Uint32 nextPool;
+ char m_cdata[sz-12];
+ void do_stuff() { m_data += m_cdata[0] + m_cdata[sz-13]; }
+};
typedef Rec<32> Rec32;
-typedef Rec<36> Rec36;
-typedef Rec<256> Rec256;
-typedef Rec<260> Rec260;
-Ndbd_mem_manager mem;
+void test_ap(Uint32 cnt, Uint32 loop)
+{
+ printf("AP ; %d ; ws ; %d ; page ; n/a", sizeof(Rec32), (cnt * sizeof(Rec32))>>10);
+ ArrayPool<Rec32> pool;
+ init(pool, cnt);
+ test_pool<Rec32, ArrayPool<Rec32> >(pool, cnt, loop);
+}
-template <typename T>
-inline
-void test_rp(Uint32 cnt, Uint32 loop, Uint32 pgsz)
+void test_rw(Uint32 cnt, Uint32 loop)
{
- printf("RP ; %d ; ws ; %d ; page ; %d",
- sizeof(T), (sizeof(T)*cnt) >> 10, pgsz >> 10);
- NdbdSuperPool sp(mem, pgsz, 19);
- GroupPool gp(sp);
- sp.init_1();
- sp.init_2();
-
- sp.setInitPages(4);
- sp.setIncrPages(4);
- sp.setMaxPages(~0);
- sp.allocMemory();
-
- RecordPool<T> pool(gp);
- test_pool<T, RecordPool<T> >(pool, cnt, loop);
+ printf("RW ; %d ; ws ; %d ; page ; n/a", sizeof(Rec32), (cnt * sizeof(Rec32))>>10);
+ RecordPool<Rec32, RWPool> pool;
+ init(pool, cnt);
+ test_pool<Rec32, RecordPool<Rec32, RWPool> >(pool, cnt, loop);
}
-template <typename T>
-inline
-void test_ap(Uint32 cnt, Uint32 loop)
+void test_wo(Uint32 cnt, Uint32 loop)
+{
+ printf("WO ; %d ; ws ; %d ; page ; n/a", sizeof(Rec32), (cnt * sizeof(Rec32))>>10);
+ RecordPool<Rec32, WOPool> pool;
+ init(pool, cnt);
+ test_pool<Rec32, RecordPool<Rec32, WOPool> >(pool, cnt, loop);
+}
+
+#include <EventLogger.hpp>
+extern EventLogger g_eventLogger;
+
+unsigned
+my_rand(unsigned* seed)
{
- printf("AP ; %d ; ws ; %d ; page ; n/a", sizeof(T), (cnt * sizeof(T))>>10);
- ArrayPool<T> pool;
- test_pool<T, ArrayPool<T> >(pool, cnt, loop);
+ unsigned val = *seed;
+ val += 117711;
+ val *= 133131;
+ return * seed = val;
}
int
main(int argc, char **argv)
{
- mem.init(10000);
+ g_eventLogger.createConsoleHandler();
+ g_eventLogger.setCategory("keso");
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_INFO);
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_CRITICAL);
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR);
+ g_eventLogger.enable(Logger::LL_ON, Logger::LL_WARNING);
- Uint32 cnt = 100;
- Uint32 loop = 300000;
+ Uint32 loops = 300000;
+ for (Uint32 i = 1 ; i<argc ; i++)
+ {
+ if (argc > i+1 && strcmp(argv[i], "-tests") == 0)
+ {
+ tests = 0;
+ for (Uint32 j = 0; j<strlen(argv[i+1]); j++)
+ {
+ char c = argv[i+1][j];
+ if (c >= '0' && c <= '9')
+ tests |= 1 << (c - '0');
+ else
+ tests |= 1 << (c - 'a');
+ }
+ ndbout_c("tests: %x", tests);
+ }
+ else if (argc > i+1 && strcmp(argv[i], "-sizes") == 0)
+ {
+ sizes = 0;
+ for (Uint32 j = 0; j<strlen(argv[i+1]); j++)
+ {
+ char c = argv[i+1][j];
+ sizes |= 1 << (c - '0');
+ }
+ ndbout_c("sizes: %x", sizes);
+ }
+ else if (argc > i+1 && strcmp(argv[i], "-loop") == 0)
+ {
+ loops = atoi(argv[i+1]);
+ }
+ }
+
+ Resource_limit rl;
+ rl.m_min = 0;
+ rl.m_max = 10000;
+ rl.m_resource_id = 0;
+ mm.set_resource_limit(rl);
+ if(!mm.init())
+ {
+ abort();
+ }
+ mm.dump();
+
+ seed = time(0);
+ Uint32 sz = 0;
+ Uint32 cnt = 768;
while(cnt <= 1000000)
{
- test_rp<Rec32>(cnt, loop, 8192);
- test_rp<Rec32>(cnt, loop, 32768);
- test_ap<Rec32>(cnt, loop);
-
- test_rp<Rec36>(cnt, loop, 8192);
- test_rp<Rec36>(cnt, loop, 32768);
- test_ap<Rec36>(cnt, loop);
+ Uint32 loop = 768 * loops / cnt;
+ if (sizes & (1 << sz))
+ {
+ if (tests & T_TEST_AP)
+ test_ap(cnt, loop);
+ if (tests & T_TEST_WO)
+ test_wo(cnt, loop);
+ if (tests & T_TEST_RW)
+ test_rw(cnt, loop);
+ }
- test_rp<Rec256>(cnt, loop, 8192);
- test_rp<Rec256>(cnt, loop, 32768);
- test_ap<Rec256>(cnt, loop);
+ cnt += (1024 << sz);
+ sz++;
+ }
+}
- test_rp<Rec260>(cnt, loop, 8192);
- test_rp<Rec260>(cnt, loop, 32768);
- test_ap<Rec260>(cnt, loop);
+Uint32 g_currentStartPhase;
- cnt *= 100;
- loop /= 100;
- }
+void childExit(int code, Uint32 currentStartPhase)
+{
+ abort();
}
-void
-ErrorReporter::handleAssert(const char * msg, const char * file,
- int line, int)
+void childAbort(int code, Uint32 currentStartPhase)
{
- ndbout << "ErrorReporter::handleAssert activated - "
- << " line= " << line << endl;
abort();
}
+
+void childReportError(int error)
+{
+ abort();
+}
+
+void
+UpgradeStartup::sendCmAppChg(Ndbcntr& cntr, Signal* signal, Uint32 startLevel){
+}
+
+void
+UpgradeStartup::execCM_APPCHG(SimulatedBlock & block, Signal* signal){
+}
+
+void
+UpgradeStartup::sendCntrMasterReq(Ndbcntr& cntr, Signal* signal, Uint32 n){
+}
+
+void
+UpgradeStartup::execCNTR_MASTER_REPLY(SimulatedBlock & block, Signal* signal){
+}
+
+#include <SimBlockList.hpp>
+
+void
+SimBlockList::unload()
+{
+
+}
+
+template void test_pool<Rec<(unsigned)32>, ArrayPool<Rec<(unsigned)32> > >(ArrayPool<Rec<(unsigned)32> >&, unsigned, unsigned);
+template void test_pool<Rec<(unsigned)32>, RecordPool<Rec<(unsigned)32>, RWPool> >(RecordPool<Rec<(unsigned)32>, RWPool>&, unsigned, unsigned);
+template void test_pool<Rec<(unsigned)32>, RecordPool<Rec<(unsigned)32>, WOPool> >(RecordPool<Rec<(unsigned)32>, WOPool>&, unsigned, unsigned);
+
+template void init<Rec<(unsigned)32> >(ArrayPool<Rec<(unsigned)32> >&, unsigned);
+template void init<Rec<(unsigned)32> >(RecordPool<Rec<(unsigned)32>, RWPool>&, unsigned);
+template void init<Rec<(unsigned)32> >(RecordPool<Rec<(unsigned)32>, WOPool>&, unsigned);
--- 1.4/storage/ndb/src/kernel/vm/Pool.hpp 2006-02-23 15:09:19 +01:00
+++ 1.5/storage/ndb/src/kernel/vm/Pool.hpp 2006-02-28 12:56:02 +01:00
@@ -304,9 +304,10 @@
void
RecordPool<T, P>::release(Uint32 i)
{
- Ptr<T> p;
- getPtr(p, i);
- m_pool.release(p);
+ Ptr<void> ptr;
+ ptr.i = i;
+ ptr.p = m_pool.getPtr(i);
+ m_pool.release(ptr);
}
template <typename T, typename P>
--- 1.1/storage/ndb/src/kernel/vm/WOPool.hpp 2006-02-23 15:09:19 +01:00
+++ 1.2/storage/ndb/src/kernel/vm/WOPool.hpp 2006-02-28 12:56:02 +01:00
@@ -20,8 +20,7 @@
{
Uint32 m_type_id;
Uint32 m_ref_count;
- Uint32 m_next_page;
- Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 3];
+ Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 2];
};
/**
--- 1.79/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-02-14 08:08:30 +01:00
+++ 1.80/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-02-28 12:56:02 +01:00
@@ -15325,8 +15325,6 @@
execute(signal, op->m_callback, 0);
}
-CArray<KeyDescriptor> g_key_descriptor_pool;
-
void
Dbdict::drop_file_prepare_start(Signal* signal, SchemaOp* op)
{
--- 1.29/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2006-02-22 14:23:50 +01:00
+++ 1.30/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2006-02-28 12:56:02 +01:00
@@ -2032,3 +2032,6 @@
}
return dstPos;
}
+
+CArray<KeyDescriptor> g_key_descriptor_pool;
+
--- 1.16/storage/ndb/src/kernel/vm/Makefile.am 2006-02-23 15:09:19 +01:00
+++ 1.17/storage/ndb/src/kernel/vm/Makefile.am 2006-02-28 12:56:02 +01:00
@@ -20,7 +20,7 @@
Mutex.cpp SafeCounter.cpp \
Rope.cpp \
ndbd_malloc.cpp ndbd_malloc_impl.cpp \
- Pool.cpp WOPool.cpp
+ Pool.cpp WOPool.cpp RWPool.cpp
INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/mgmapi
@@ -53,9 +53,9 @@
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a
-bench_pool_SOURCES = bench_pool.cpp ndbd_malloc.cpp \
- SuperPool.cpp NdbdSuperPool.cpp ndbd_malloc_impl.cpp
+bench_pool_SOURCES = bench_pool.cpp ../SimBlockList.o
bench_pool_LDFLAGS = @ndb_bin_am_ldflags@ \
+ libkernel.a ../error/liberror.a \
$(top_builddir)/storage/ndb/src/libndbclient.la \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2113) | jonas | 28 Feb |