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@stripped, 2007-03-24 08:59:23+01:00, jonas@stripped +3 -0
import ndbmtd -
post merge
storage/ndb/src/kernel/vm/Makefile.am@stripped, 2007-03-24 08:59:21+01:00, jonas@stripped +5 -1
post merge
storage/ndb/src/kernel/vm/mt/mt.cpp@stripped, 2007-03-24 08:59:21+01:00, jonas@stripped +1 -1
post merge
storage/ndb/src/kernel/vm/mt/sb_mt.cpp@stripped, 2007-03-24 08:59:21+01:00, jonas@stripped +32 -31
post merge
# 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: perch.ndb.mysql.com
# Root: /home/jonas/src/51-mt
--- 1.1/storage/ndb/src/kernel/vm/mt/mt.cpp 2007-03-24 08:59:28 +01:00
+++ 1.2/storage/ndb/src/kernel/vm/mt/mt.cpp 2007-03-24 08:59:29 +01:00
@@ -222,7 +222,7 @@
seize_buffer(struct thr_repository* rep, int thr_no)
{
thr_job_buffer* jb;
- if (likely((jb = rep->m_thread[thr_no].m_free_list)))
+ if (likely((jb = rep->m_thread[thr_no].m_free_list) != 0))
{
thr_job_buffer* next = reinterpret_cast<thr_job_buffer*>(jb->m_len);
rep->m_thread[thr_no].m_free_list = next;
--- 1.1/storage/ndb/src/kernel/vm/mt/sb_mt.cpp 2007-03-24 08:59:29 +01:00
+++ 1.2/storage/ndb/src/kernel/vm/mt/sb_mt.cpp 2007-03-24 08:59:29 +01:00
@@ -37,6 +37,9 @@
#include <Properties.hpp>
#include "Configuration.hpp"
#include "mt.hpp"
+#include <AttributeDescriptor.hpp>
+#include <NdbSqlUtil.hpp>
+
#define ljamEntry() jamEntryLine(30000 + __LINE__)
#define ljam() jamLine(30000 + __LINE__)
@@ -45,17 +48,18 @@
// Constructor, Destructor
//
SimulatedBlock::SimulatedBlock(BlockNumber blockNumber,
- const class Configuration & conf)
+ struct Block_context & ctx)
: theNodeId(globalData.ownId),
theNumber(blockNumber),
theReference(numberToRef(blockNumber, globalData.ownId)),
- theConfiguration(conf),
+ m_ctx(ctx),
+ m_global_page_pool(globalData.m_global_page_pool),
+ m_shared_page_pool(globalData.m_shared_page_pool),
c_fragmentInfoHash(c_fragmentInfoPool),
c_linearFragmentSendList(c_fragmentSendPool),
c_segmentedFragmentSendList(c_fragmentSendPool),
c_mutexMgr(* this),
- c_counterMgr(* this),
- c_ptrMetaDataCommon(0)
+ c_counterMgr(* this)
{
NewVarRef = 0;
@@ -574,13 +578,6 @@
BlockNumber bnr = refToBlock(ref);
- //BlockNumber sendBnr = number();
- BlockReference sendBRef = reference();
-
- if (bnr == 0) {
- bnr_error();
- }//if
-
signal->header.theLength = length;
signal->header.theSendersSignalId = signal->header.theSignalId;
signal->header.theVerId_signalNumber = gsn;
@@ -654,29 +651,39 @@
}
void*
-SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
+SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear, Uint32 paramId)
{
void * p = NULL;
size_t size = n*s;
+ Uint64 real_size = (Uint64)((Uint64)n)*((Uint64)s);
refresh_watch_dog();
- if (size > 0){
+ if (real_size > 0){
#ifdef VM_TRACE_MEM
- ndbout_c("%s::allocRecord(%s, %u, %u) = %u bytes",
+ ndbout_c("%s::allocRecord(%s, %u, %u) = %llu bytes",
getBlockName(number()),
type,
s,
n,
- size);
+ real_size);
#endif
- p = ndbd_malloc(size);
+ if( real_size == (Uint64)size )
+ p = ndbd_malloc(size);
if (p == NULL){
char buf1[255];
char buf2[255];
- BaseString::snprintf(buf1, sizeof(buf1), "%s could not allocate memory for %s",
- getBlockName(number()), type);
- BaseString::snprintf(buf2, sizeof(buf2), "Requested: %ux%u = %u bytes",
- (Uint32)s, (Uint32)n, (Uint32)size);
+ struct ndb_mgm_param_info param_info;
+ size_t size = sizeof(ndb_mgm_param_info);
+
+ if(0 != paramId && 0 == ndb_mgm_get_db_parameter_info(paramId, ¶m_info, &size)) {
+ BaseString::snprintf(buf1, sizeof(buf1), "%s could not allocate memory for parameter %s",
+ getBlockName(number()), param_info.m_name);
+ } else {
+ BaseString::snprintf(buf1, sizeof(buf1), "%s could not allocate memory for %s",
+ getBlockName(number()), type);
+ }
+ BaseString::snprintf(buf2, sizeof(buf2), "Requested: %ux%u = %llu bytes",
+ (Uint32)s, (Uint32)n, (Uint64)real_size);
ERROR_SET(fatal, NDBD_EXIT_MEMALLOC, buf1, buf2);
}
@@ -722,9 +729,9 @@
// Pack status of interesting config variables
// so that we can print them in error.log
int magicStatus =
- (theConfiguration.stopOnError()<<1) +
- (theConfiguration.getInitialStart()<<2) +
- (theConfiguration.getDaemonMode()<<3);
+ (m_ctx.m_config.stopOnError()<<1) +
+ (m_ctx.m_config.getInitialStart()<<2) +
+ (m_ctx.m_config.getDaemonMode()<<3);
/* Add line number to block name */
@@ -919,14 +926,6 @@
SimulatedBlock::execNODE_START_REP(Signal* signal)
{
// common stuff for all blocks
-
- // block specific stuff by virtual method override (default empty)
- exec_node_start_rep(signal);
-}
-
-void
-SimulatedBlock::exec_node_start_rep(Signal* signal)
-{
}
#ifdef VM_TRACE_TIME
@@ -1992,3 +1991,5 @@
}
return dstPos;
}
+
+CArray<KeyDescriptor> g_key_descriptor_pool;
--- 1.21/storage/ndb/src/kernel/vm/Makefile.am 2007-03-24 08:59:29 +01:00
+++ 1.22/storage/ndb/src/kernel/vm/Makefile.am 2007-03-24 08:59:29 +01:00
@@ -27,7 +27,9 @@
WatchDog.cpp \
SimplePropertiesSection.cpp \
SectionReader.cpp \
- Mutex.cpp SafeCounter.cpp ndbd_malloc.cpp
+ Mutex.cpp SafeCounter.cpp \
+ Rope.cpp \
+ ndbd_malloc.cpp \
ndbd_malloc_impl.cpp \
Pool.cpp WOPool.cpp RWPool.cpp DynArr256.cpp
@@ -40,6 +42,8 @@
libsched_mt_a_SOURCES = mt/mt.cpp \
mt/sb_mt.cpp \
mt/dummy_mt.cpp
+
+INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/mgmapi
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2498) | jonas | 24 Mar |