summaryrefslogtreecommitdiff
path: root/ndb/src/kernel
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-12-31 00:50:30 +0200
committerunknown <monty@mysql.com>2004-12-31 00:50:30 +0200
commit12a215b0833d9aa688ba16fe56eb3411a83e7d4f (patch)
treed4dfebc9b9c93790a9be3f9e6807f3923a6b3d3e /ndb/src/kernel
parentcdf70f2ede108267ce492abada82ca753f269e25 (diff)
parent2e8d13c73ec986dde580c9c840f421af4279611a (diff)
downloadmariadb-git-12a215b0833d9aa688ba16fe56eb3411a83e7d4f.tar.gz
Merge with global tree
BitKeeper/etc/logging_ok: auto-union client/mysqltest.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/include/dict0dict.h: Auto merged libmysql/errmsg.c: Auto merged myisam/mi_open.c: Auto merged myisam/mi_write.c: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/t/derived.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged scripts/mysql_install_db.sh: Auto merged sql/ha_innodb.cc: Auto merged sql/handler.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sp.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged sql/tztime.h: Auto merged
Diffstat (limited to 'ndb/src/kernel')
-rw-r--r--ndb/src/kernel/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/Makefile.am2
-rw-r--r--ndb/src/kernel/blocks/backup/Backup.cpp123
-rw-r--r--ndb/src/kernel/blocks/backup/Backup.hpp40
-rw-r--r--ndb/src/kernel/blocks/backup/BackupInit.cpp6
-rw-r--r--ndb/src/kernel/blocks/backup/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp27
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbacc/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp8
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp2
-rw-r--r--ndb/src/kernel/blocks/dbdict/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbdih/Dbdih.hpp2
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp4
-rw-r--r--ndb/src/kernel/blocks/dbdih/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/dblqh/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtc/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupGen.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtup/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp4
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtux/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbutil/DbUtil.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbutil/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/grep/Grep.cpp36
-rw-r--r--ndb/src/kernel/blocks/grep/Grep.hpp8
-rw-r--r--ndb/src/kernel/blocks/grep/GrepInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/grep/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp4
-rw-r--r--ndb/src/kernel/blocks/ndbfs/VoidFs.cpp2
-rw-r--r--ndb/src/kernel/blocks/qmgr/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/qmgr/QmgrInit.cpp2
-rw-r--r--ndb/src/kernel/blocks/suma/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/suma/Suma.cpp2
-rw-r--r--ndb/src/kernel/blocks/suma/SumaInit.cpp4
-rw-r--r--ndb/src/kernel/blocks/trix/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/trix/Trix.cpp2
-rw-r--r--ndb/src/kernel/error/Makefile.am14
-rw-r--r--ndb/src/kernel/main.cpp20
-rw-r--r--ndb/src/kernel/vm/Callback.hpp7
-rw-r--r--ndb/src/kernel/vm/Configuration.cpp39
-rw-r--r--ndb/src/kernel/vm/Emulator.cpp4
-rw-r--r--ndb/src/kernel/vm/Makefile.am14
-rw-r--r--ndb/src/kernel/vm/Mutex.cpp53
-rw-r--r--ndb/src/kernel/vm/Mutex.hpp102
-rw-r--r--ndb/src/kernel/vm/SectionReader.cpp2
-rw-r--r--ndb/src/kernel/vm/SectionReader.hpp2
-rw-r--r--ndb/src/kernel/vm/SimplePropertiesSection.cpp4
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.cpp2
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.hpp71
58 files changed, 522 insertions, 348 deletions
diff --git a/ndb/src/kernel/Makefile.am b/ndb/src/kernel/Makefile.am
index 493ab4f9982..55d3c5a578f 100644
--- a/ndb/src/kernel/Makefile.am
+++ b/ndb/src/kernel/Makefile.am
@@ -59,3 +59,17 @@ LDADD += \
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: ndbd.dsp
+
+ndbd.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-prg.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-prg.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(ndbbin_PROGRAMS)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(ndbd_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
diff --git a/ndb/src/kernel/blocks/Makefile.am b/ndb/src/kernel/blocks/Makefile.am
index 0b2bc3b8c88..7ee90e6239f 100644
--- a/ndb/src/kernel/blocks/Makefile.am
+++ b/ndb/src/kernel/blocks/Makefile.am
@@ -15,3 +15,5 @@ SUBDIRS = \
suma \
grep \
dbtux
+
+windoze-dsp:
diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp
index 9fc00883792..07aeb771c97 100644
--- a/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -1272,10 +1272,6 @@ Backup::createAttributeMask(TablePtr tabPtr,
jam();
AttributePtr attr;
table.attributes.getPtr(attr, i);
- if(attr.p->data.key != 0){
- jam();
- continue;
- }
mask.set(i);
}
}
@@ -2961,12 +2957,9 @@ Backup::parseTableDescription(Signal* signal, BackupRecordPtr ptr, Uint32 len)
tabPtr.p->schemaVersion = tmpTab.TableVersion;
tabPtr.p->noOfAttributes = tmpTab.NoOfAttributes;
- tabPtr.p->noOfKeys = tmpTab.NoOfKeyAttr;
tabPtr.p->noOfNull = 0;
tabPtr.p->noOfVariable = 0; // Computed while iterating over attribs
- tabPtr.p->sz_FixedKeys = 0; // Computed while iterating over attribs
tabPtr.p->sz_FixedAttributes = 0; // Computed while iterating over attribs
- tabPtr.p->variableKeyId = RNIL; // Computed while iterating over attribs
tabPtr.p->triggerIds[0] = ILLEGAL_TRIGGER_ID;
tabPtr.p->triggerIds[1] = ILLEGAL_TRIGGER_ID;
tabPtr.p->triggerIds[2] = ILLEGAL_TRIGGER_ID;
@@ -3001,7 +2994,6 @@ Backup::parseTableDescription(Signal* signal, BackupRecordPtr ptr, Uint32 len)
attrPtr.p->data.nullable = tmp.AttributeNullableFlag;
attrPtr.p->data.fixed = (tmp.AttributeArraySize != 0);
- attrPtr.p->data.key = tmp.AttributeKeyFlag;
attrPtr.p->data.sz32 = sz32;
/**
@@ -3009,50 +3001,26 @@ Backup::parseTableDescription(Signal* signal, BackupRecordPtr ptr, Uint32 len)
* 1) Fixed
* 2) Nullable
* 3) Variable
- * 4) Fixed key
- * 5) Variable key
*/
- if(attrPtr.p->data.key == false) {
+ if(attrPtr.p->data.fixed == true && attrPtr.p->data.nullable == false) {
jam();
-
- if(attrPtr.p->data.fixed == true && attrPtr.p->data.nullable == false) {
- jam();
- attrPtr.p->data.offset = tabPtr.p->sz_FixedAttributes;
- tabPtr.p->sz_FixedAttributes += sz32;
- }//if
-
- if(attrPtr.p->data.fixed == true && attrPtr.p->data.nullable == true) {
- jam();
- attrPtr.p->data.offset = 0;
-
- attrPtr.p->data.offsetNull = tabPtr.p->noOfNull;
- tabPtr.p->noOfNull++;
- tabPtr.p->noOfVariable++;
- }//if
-
- if(attrPtr.p->data.fixed == false) {
- jam();
- tabPtr.p->noOfVariable++;
- ndbrequire(0);
- }//if
-
- } else if(attrPtr.p->data.key == true) {
+ attrPtr.p->data.offset = tabPtr.p->sz_FixedAttributes;
+ tabPtr.p->sz_FixedAttributes += sz32;
+ }//if
+
+ if(attrPtr.p->data.fixed == true && attrPtr.p->data.nullable == true) {
jam();
- ndbrequire(attrPtr.p->data.nullable == false);
+ attrPtr.p->data.offset = 0;
- if(attrPtr.p->data.fixed == true) { // Fixed key
- jam();
- tabPtr.p->sz_FixedKeys += sz32;
- }//if
-
- if(attrPtr.p->data.fixed == false) { // Variable key
- jam();
- attrPtr.p->data.offset = 0;
- tabPtr.p->noOfVariable++;
- ndbrequire(tabPtr.p->variableKeyId == RNIL); // Only one variable key
- tabPtr.p->variableKeyId = attrPtr.i;
- ndbrequire(0);
- }//if
+ attrPtr.p->data.offsetNull = tabPtr.p->noOfNull;
+ tabPtr.p->noOfNull++;
+ tabPtr.p->noOfVariable++;
+ }//if
+
+ if(attrPtr.p->data.fixed == false) {
+ jam();
+ tabPtr.p->noOfVariable++;
+ ndbrequire(0);
}//if
it.next(); // Move Past EndOfAttribute
@@ -3362,7 +3330,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
Table & table = * tabPtr.p;
ScanFragReq * req = (ScanFragReq *)signal->getDataPtrSend();
const Uint32 parallelism = 16;
- const Uint32 attrLen = 5 + table.noOfAttributes - table.noOfKeys;
+ const Uint32 attrLen = 5 + table.noOfAttributes;
req->senderData = filePtr.i;
req->resultRef = reference();
@@ -3373,7 +3341,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
req->tableId = table.tableId;
ScanFragReq::setLockMode(req->requestInfo, 0);
ScanFragReq::setHoldLockFlag(req->requestInfo, 0);
- ScanFragReq::setKeyinfoFlag(req->requestInfo, 1);
+ ScanFragReq::setKeyinfoFlag(req->requestInfo, 0);
ScanFragReq::setAttrLen(req->requestInfo,attrLen);
req->transId1 = 0;
req->transId2 = (BACKUP << 20) + (getOwnNodeId() << 8);
@@ -3388,7 +3356,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
signal->theData[2] = (BACKUP << 20) + (getOwnNodeId() << 8);
// Return all
- signal->theData[3] = table.noOfAttributes - table.noOfKeys;
+ signal->theData[3] = table.noOfAttributes;
signal->theData[4] = 0;
signal->theData[5] = 0;
signal->theData[6] = 0;
@@ -3400,10 +3368,6 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
jam();
AttributePtr attr;
table.attributes.getPtr(attr, i);
- if(attr.p->data.key != 0) {
- jam();
- continue;
- }//if
AttributeHeader::init(&signal->theData[dataPos], i, 0);
dataPos++;
@@ -3513,64 +3477,19 @@ Backup::execTRANSID_AI(Signal* signal)
}
}
-void
-Backup::execKEYINFO20(Signal* signal)
-{
- jamEntry();
-
- const Uint32 filePtrI = signal->theData[0];
- const Uint32 keyLen = signal->theData[1];
- //const Uint32 scanInfo = signal->theData[2];
- //const Uint32 transId1 = signal->theData[3];
- //const Uint32 transId2 = signal->theData[4];
- const Uint32 dataLen = signal->length() - 5;
-
- BackupFilePtr filePtr;
- c_backupFilePool.getPtr(filePtr, filePtrI);
-
- OperationRecord & op = filePtr.p->operation;
-
- /**
- * Unpack data
- */
- ndbrequire(keyLen == dataLen);
- const Uint32 * src = &signal->theData[5];
- const Uint32 klFixed = op.getFixedKeySize();
- ndbrequire(keyLen >= klFixed);
-
- Uint32 * dst = op.newKey();
- memcpy(dst, src, klFixed << 2);
-
- const Uint32 szLeft = (keyLen - klFixed);
- if(szLeft > 0) {
- jam();
- src += klFixed;
- dst = op.newVariableKey(szLeft);
- memcpy(dst, src, (szLeft << 2));
- ndbrequire(0);
- }//if
-
- if(op.finished()){
- jam();
- op.newRecord(op.dst);
- }
-}
-
void
Backup::OperationRecord::init(const TablePtr & ptr)
{
tablePtr = ptr.i;
- noOfAttributes = (ptr.p->noOfAttributes - ptr.p->noOfKeys) + 1;
- variableKeyId = ptr.p->variableKeyId;
+ noOfAttributes = ptr.p->noOfAttributes;
sz_Bitmask = (ptr.p->noOfNull + 31) >> 5;
- sz_FixedKeys = ptr.p->sz_FixedKeys;
sz_FixedAttribs = ptr.p->sz_FixedAttributes;
if(ptr.p->noOfVariable == 0) {
jam();
- maxRecordSize = 1 + sz_Bitmask + sz_FixedKeys + sz_FixedAttribs;
+ maxRecordSize = 1 + sz_Bitmask + sz_FixedAttribs;
} else {
jam();
maxRecordSize =
diff --git a/ndb/src/kernel/blocks/backup/Backup.hpp b/ndb/src/kernel/blocks/backup/Backup.hpp
index fb29cb03b96..1a5d6c7a925 100644
--- a/ndb/src/kernel/blocks/backup/Backup.hpp
+++ b/ndb/src/kernel/blocks/backup/Backup.hpp
@@ -76,7 +76,6 @@ protected:
*/
void execSCAN_HBREP(Signal* signal);
void execTRANSID_AI(Signal* signal);
- void execKEYINFO20(Signal* signal);
void execSCAN_FRAGREF(Signal* signal);
void execSCAN_FRAGCONF(Signal* signal);
@@ -172,8 +171,8 @@ public:
struct Data {
Uint8 nullable;
Uint8 fixed;
- Uint8 key;
- Uint8 unused;
+ Uint8 unused;
+ Uint8 unused2;
Uint32 sz32; // No of 32 bit words
Uint32 offset; // Relative DataFixedAttributes/DataFixedKeys
Uint32 offsetNull; // In NullBitmask
@@ -199,12 +198,9 @@ public:
Uint32 frag_mask;
Uint32 tableType;
Uint32 noOfNull;
- Uint32 noOfKeys;
Uint32 noOfAttributes;
Uint32 noOfVariable;
- Uint32 sz_FixedKeys;
Uint32 sz_FixedAttributes;
- Uint32 variableKeyId;
Uint32 triggerIds[3];
bool triggerAllocated[3];
@@ -224,7 +220,6 @@ public:
* Once per table
*/
void init(const TablePtr & ptr);
- inline Uint32 getFixedKeySize() const { return sz_FixedKeys; }
/**
* Once per fragment
@@ -247,23 +242,19 @@ public:
/**
* Per attribute
*/
- Uint32 * newKey();
void nullAttribute(Uint32 nullOffset);
Uint32 * newNullable(Uint32 attrId, Uint32 sz);
Uint32 * newAttrib(Uint32 offset, Uint32 sz);
Uint32 * newVariable(Uint32 id, Uint32 sz);
- Uint32 * newVariableKey(Uint32 sz);
private:
Uint32* base;
Uint32* dst_Length;
Uint32* dst_Bitmask;
- Uint32* dst_FixedKeys;
Uint32* dst_FixedAttribs;
BackupFormat::DataFile::VariableData* dst_VariableData;
Uint32 noOfAttributes; // No of Attributes
- Uint32 variableKeyId; // Id of variable key
Uint32 attrLeft; // No of attributes left
Uint32 opNoDone;
@@ -289,7 +280,6 @@ public:
* sizes of part
*/
Uint32 sz_Bitmask;
- Uint32 sz_FixedKeys;
Uint32 sz_FixedAttribs;
public:
@@ -629,7 +619,6 @@ Backup::OperationRecord::newRecord(Uint32 * p){
base = p;
dst_Length = p; p += 1;
dst_Bitmask = p; p += sz_Bitmask;
- dst_FixedKeys = p; p += sz_FixedKeys;
dst_FixedAttribs = p; p += sz_FixedAttribs;
dst_VariableData = (BackupFormat::DataFile::VariableData*)p;
BitmaskImpl::clear(sz_Bitmask, dst_Bitmask);
@@ -647,14 +636,6 @@ Backup::OperationRecord::newAttrib(Uint32 offset, Uint32 sz){
}
inline
-Uint32 *
-Backup::OperationRecord::newKey(){
- attrLeft --;
- attrSzLeft = 0;
- return dst_FixedKeys;
-}
-
-inline
void
Backup::OperationRecord::nullAttribute(Uint32 offsetNull){
attrLeft --;
@@ -693,28 +674,13 @@ Backup::OperationRecord::newVariable(Uint32 id, Uint32 sz){
}
inline
-Uint32 *
-Backup::OperationRecord::newVariableKey(Uint32 sz){
- attrLeft--;
- attrSzLeft = 0;
- attrSzTotal += sz;
-
- dst = &dst_VariableData->Data[0];
- dst_VariableData->Sz = htonl(sz);
- dst_VariableData->Id = htonl(variableKeyId);
-
- dst_VariableData = (BackupFormat::DataFile::VariableData *)(dst + sz);
- return dst;
-}
-
-inline
bool
Backup::OperationRecord::finished(){
if(attrLeft != 0 || attrSzLeft != 0){
return false;
}
- opLen += attrSzTotal + sz_FixedKeys;
+ opLen += attrSzTotal;
opNoDone++;
scanStop = dst = (Uint32 *)dst_VariableData;
diff --git a/ndb/src/kernel/blocks/backup/BackupInit.cpp b/ndb/src/kernel/blocks/backup/BackupInit.cpp
index d98541f2ea8..e0171c61eca 100644
--- a/ndb/src/kernel/blocks/backup/BackupInit.cpp
+++ b/ndb/src/kernel/blocks/backup/BackupInit.cpp
@@ -44,7 +44,8 @@ Backup::Backup(const Configuration & conf) :
Uint32 noBackups = 0, noTables = 0, noAttribs = 0;
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &m_diskless));
ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_BACKUPS, &noBackups);
- ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables));
+ // ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables));
+ ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DICT_TABLE, &noTables));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES, &noAttribs));
noAttribs++; //RT 527 bug fix
@@ -127,7 +128,6 @@ Backup::Backup(const Configuration & conf) :
addRecSignal(GSN_SCAN_HBREP, &Backup::execSCAN_HBREP);
addRecSignal(GSN_TRANSID_AI, &Backup::execTRANSID_AI);
- addRecSignal(GSN_KEYINFO20, &Backup::execKEYINFO20);
addRecSignal(GSN_SCAN_FRAGREF, &Backup::execSCAN_FRAGREF);
addRecSignal(GSN_SCAN_FRAGCONF, &Backup::execSCAN_FRAGCONF);
@@ -205,7 +205,7 @@ Backup::~Backup()
{
}
-BLOCK_FUNCTIONS(Backup);
+BLOCK_FUNCTIONS(Backup)
template class ArrayPool<Backup::Page32>;
template class ArrayPool<Backup::Attribute>;
diff --git a/ndb/src/kernel/blocks/backup/Makefile.am b/ndb/src/kernel/blocks/backup/Makefile.am
index e669febdc0d..c8f44f31292 100644
--- a/ndb/src/kernel/blocks/backup/Makefile.am
+++ b/ndb/src/kernel/blocks/backup/Makefile.am
@@ -8,3 +8,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libbackup.dsp
+
+libbackup.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libbackup_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 234d832655c..c1dca184466 100644
--- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -150,6 +150,7 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
ndbrequire(false);
}
+#ifndef NDB_WIN32
if(ERROR_INSERTED(9996)){
simulate_error_during_shutdown= SIGSEGV;
ndbrequire(false);
@@ -159,6 +160,7 @@ void Cmvmi::execNDB_TAMPER(Signal* signal)
simulate_error_during_shutdown= SIGSEGV;
kill(getpid(), SIGABRT);
}
+#endif
}//execNDB_TAMPER()
void Cmvmi::execSET_LOGLEVELORD(Signal* signal)
@@ -193,21 +195,11 @@ void Cmvmi::execEVENT_REP(Signal* signal)
/**
* If entry is not found
*/
- Uint32 threshold = 16;
- LogLevel::EventCategory eventCategory = (LogLevel::EventCategory)0;
-
- for(unsigned int i = 0; i< EventLoggerBase::matrixSize; i++){
- if(EventLoggerBase::matrix[i].eventType == eventType){
- eventCategory = EventLoggerBase::matrix[i].eventCategory;
- threshold = EventLoggerBase::matrix[i].threshold;
- break;
- }
- }
-
- if(threshold > 15){
- // No entry found in matrix (or event that should never be printed)
+ Uint32 threshold;
+ LogLevel::EventCategory eventCategory;
+ Logger::LoggerLevel severity;
+ if (EventLoggerBase::event_lookup(eventType,eventCategory,threshold,severity))
return;
- }
SubscriberPtr ptr;
for(subscribers.first(ptr); ptr.i != RNIL; subscribers.next(ptr)){
@@ -225,14 +217,15 @@ void Cmvmi::execEVENT_REP(Signal* signal)
// Print the event info
g_eventLogger.log(eventReport->getEventType(), signal->theData);
+ return;
}//execEVENT_REP()
void
Cmvmi::execEVENT_SUBSCRIBE_REQ(Signal * signal){
EventSubscribeReq * subReq = (EventSubscribeReq *)&signal->theData[0];
SubscriberPtr ptr;
-
jamEntry();
+ DBUG_ENTER("Cmvmi::execEVENT_SUBSCRIBE_REQ");
/**
* Search for subcription
@@ -269,11 +262,13 @@ Cmvmi::execEVENT_SUBSCRIBE_REQ(Signal * signal){
category = (LogLevel::EventCategory)(subReq->theData[i] >> 16);
level = subReq->theData[i] & 0xFFFF;
ptr.p->logLevel.setLogLevel(category, level);
+ DBUG_PRINT("info",("entry %d: level=%d, category= %d", i, level, category));
}
}
signal->theData[0] = ptr.i;
sendSignal(ptr.p->blockRef, GSN_EVENT_SUBSCRIBE_CONF, signal, 1, JBB);
+ DBUG_VOID_RETURN;
}
void
@@ -1117,7 +1112,7 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
}//Cmvmi::execDUMP_STATE_ORD()
-BLOCK_FUNCTIONS(Cmvmi);
+BLOCK_FUNCTIONS(Cmvmi)
static Uint32 g_print;
static LinearSectionPtr g_test[3];
diff --git a/ndb/src/kernel/blocks/cmvmi/Makefile.am b/ndb/src/kernel/blocks/cmvmi/Makefile.am
index fdd43932682..dc2e12746fd 100644
--- a/ndb/src/kernel/blocks/cmvmi/Makefile.am
+++ b/ndb/src/kernel/blocks/cmvmi/Makefile.am
@@ -8,3 +8,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libcmvmi.dsp
+
+libcmvmi.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libcmvmi_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
index c9b6c0ea17d..64647f2e41f 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
@@ -265,4 +265,4 @@ Dbacc::~Dbacc()
}//Dbacc::~Dbacc()
-BLOCK_FUNCTIONS(Dbacc);
+BLOCK_FUNCTIONS(Dbacc)
diff --git a/ndb/src/kernel/blocks/dbacc/Makefile.am b/ndb/src/kernel/blocks/dbacc/Makefile.am
index eeca061dead..ca1b1efac37 100644
--- a/ndb/src/kernel/blocks/dbacc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbacc/Makefile.am
@@ -10,3 +10,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbacc.dsp
+
+libdbacc.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbacc_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 8327b7fe390..fa2fc856c92 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -532,7 +532,7 @@ Dbdict::writeTableFile(Signal* signal, Uint32 tableId,
Uint32 sz = tabInfoPtr.sz + ZPAGE_HEADER_SIZE;
c_writeTableRecord.noOfPages = DIV(sz, ZSIZE_OF_PAGES_IN_WORDS);
- c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK;
+ c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK;
c_writeTableRecord.m_callback = * callback;
c_writeTableRecord.pageId = 0;
@@ -651,7 +651,7 @@ void Dbdict::closeWriteTableConf(Signal* signal,
case WriteTableRecord::WRITE_RESTART_FROM_OWN :
ndbrequire(false);
break;
- case WriteTableRecord::CALLBACK:
+ case WriteTableRecord::TWR_CALLBACK:
jam();
execute(signal, c_writeTableRecord.m_callback, 0);
return;
@@ -1192,7 +1192,7 @@ Dbdict::~Dbdict()
{
}//Dbdict::~Dbdict()
-BLOCK_FUNCTIONS(Dbdict);
+BLOCK_FUNCTIONS(Dbdict)
void Dbdict::initCommonData()
{
@@ -2387,7 +2387,7 @@ Dbdict::restartCreateTab_readTableConf(Signal* signal,
ndbrequire(c_writeTableRecord.tableWriteState == WriteTableRecord::IDLE);
c_writeTableRecord.noOfPages = c_readTableRecord.noOfPages;
c_writeTableRecord.pageId = c_readTableRecord.pageId;
- c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK;
+ c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK;
c_writeTableRecord.m_callback.m_callbackData = callbackData;
c_writeTableRecord.m_callback.m_callbackFunction =
safe_cast(&Dbdict::restartCreateTab_writeTableConf);
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index af80bcf5f94..5fc4742e829 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -639,7 +639,7 @@ private:
WRITE_ADD_TABLE_SLAVE = 2,
WRITE_RESTART_FROM_MASTER = 3,
WRITE_RESTART_FROM_OWN = 4,
- CALLBACK = 5
+ TWR_CALLBACK = 5
};
TableWriteState tableWriteState;
Callback m_callback;
diff --git a/ndb/src/kernel/blocks/dbdict/Makefile.am b/ndb/src/kernel/blocks/dbdict/Makefile.am
index dc4c4fe4734..9a0d68f8148 100644
--- a/ndb/src/kernel/blocks/dbdict/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdict/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbdict.dsp
+
+libdbdict.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbdict_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
index 0a2d50cb876..ee67bf47d7b 100644
--- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
@@ -1468,7 +1468,7 @@ private:
Uint32 c_blockCommitNo;
bool getBlockCommit() const {
- return c_blockCommit == true || cgckptflag == true;
+ return c_blockCommit || cgckptflag;
}
/**
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp b/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
index 7ca45ef4b43..b823dbcd952 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
@@ -314,7 +314,7 @@ Dbdih::~Dbdih()
}//Dbdih::~Dbdih()
-BLOCK_FUNCTIONS(Dbdih);
+BLOCK_FUNCTIONS(Dbdih)
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index c84908848f2..de08449730f 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -12941,7 +12941,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
Uint32 nodeOrder[MAX_REPLICAS];
const Uint32 noOfReplicas = extractNodeInfo(fragPtr.p, nodeOrder);
char buf[100];
- snprintf(buf, sizeof(buf), " Table %d Fragment %d - ", tabPtr.i, j);
+ BaseString::snprintf(buf, sizeof(buf), " Table %d Fragment %d - ", tabPtr.i, j);
for(Uint32 k = 0; k < noOfReplicas; k++){
char tmp[100];
BaseString::snprintf(tmp, sizeof(tmp), "%d ", nodeOrder[k]);
@@ -13152,7 +13152,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
getFragstore(tabPtr.p, fid, fragPtr);
char buf[100], buf2[100];
- snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ",
+ BaseString::snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ",
fid, fragPtr.p->noLcpReplicas);
Uint32 num=0;
diff --git a/ndb/src/kernel/blocks/dbdih/Makefile.am b/ndb/src/kernel/blocks/dbdih/Makefile.am
index 2ee8017ec13..d6ad380b806 100644
--- a/ndb/src/kernel/blocks/dbdih/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdih/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbdih.dsp
+
+libdbdih.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbdih_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
index f8ce8845a51..2b62e907e7b 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
@@ -452,5 +452,5 @@ Dblqh::~Dblqh()
ctcNodeFailrecFileSize);
}//Dblqh::~Dblqh()
-BLOCK_FUNCTIONS(Dblqh);
+BLOCK_FUNCTIONS(Dblqh)
diff --git a/ndb/src/kernel/blocks/dblqh/Makefile.am b/ndb/src/kernel/blocks/dblqh/Makefile.am
index 3a58dba742e..854860b269c 100644
--- a/ndb/src/kernel/blocks/dblqh/Makefile.am
+++ b/ndb/src/kernel/blocks/dblqh/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdblqh.dsp
+
+libdblqh.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdblqh_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp b/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
index e38089242c3..5c66ba776b0 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
@@ -365,5 +365,5 @@ Dbtc::~Dbtc()
capiConnectFilesize);
}//Dbtc::~Dbtc()
-BLOCK_FUNCTIONS(Dbtc);
+BLOCK_FUNCTIONS(Dbtc)
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 42821e4fe7f..f964cc2fd9c 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -6340,7 +6340,7 @@ void Dbtc::sendAbortedAfterTimeout(Signal* signal, int Tcheck)
*------------------------------------------------------------------*/
char buf[96]; buf[0] = 0;
char buf2[96];
- snprintf(buf, sizeof(buf), "TC %d: %d ops:",
+ BaseString::snprintf(buf, sizeof(buf), "TC %d: %d ops:",
__LINE__, apiConnectptr.i);
for(Uint32 i = 0; i<TloopCount; i++){
BaseString::snprintf(buf2, sizeof(buf2), "%s %d", buf, tmp[i]);
diff --git a/ndb/src/kernel/blocks/dbtc/Makefile.am b/ndb/src/kernel/blocks/dbtc/Makefile.am
index 4aa514c0aba..98ee2639bac 100644
--- a/ndb/src/kernel/blocks/dbtc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtc/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtc.dsp
+
+libdbtc.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtc_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
index d33adcd08e1..8e1cba24359 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
@@ -215,7 +215,7 @@ Dbtup::~Dbtup()
}//Dbtup::~Dbtup()
-BLOCK_FUNCTIONS(Dbtup);
+BLOCK_FUNCTIONS(Dbtup)
/* **************************************************************** */
/* ---------------------------------------------------------------- */
diff --git a/ndb/src/kernel/blocks/dbtup/Makefile.am b/ndb/src/kernel/blocks/dbtup/Makefile.am
index 7e94a01d43b..e51410e6be3 100644
--- a/ndb/src/kernel/blocks/dbtup/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtup/Makefile.am
@@ -25,3 +25,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtup.dsp
+
+libdbtup.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtup_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index cd7a97d4b17..b9cb179c6b2 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -1064,7 +1064,7 @@ Dbtux::Index::Index() :
m_fragId[i] = ZNIL;
m_fragPtrI[i] = RNIL;
};
-};
+}
// Dbtux::Frag
@@ -1100,7 +1100,7 @@ Dbtux::FragOp::FragOp() :
m_fragNo(ZNIL),
m_numAttrsRecvd(ZNIL)
{
-};
+}
// Dbtux::NodeHandle
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
index 18aa914de05..8990d6c86b6 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
@@ -293,4 +293,4 @@ Dbtux::copyAttrs(const Frag& frag, ConstData data1, Data data2, unsigned maxlen2
#endif
}
-BLOCK_FUNCTIONS(Dbtux);
+BLOCK_FUNCTIONS(Dbtux)
diff --git a/ndb/src/kernel/blocks/dbtux/Makefile.am b/ndb/src/kernel/blocks/dbtux/Makefile.am
index 7d012924522..b5951e8ed37 100644
--- a/ndb/src/kernel/blocks/dbtux/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtux/Makefile.am
@@ -18,3 +18,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbtux.dsp
+
+libdbtux.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbtux_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
index f7e8981e122..b94bb8e6d7e 100644
--- a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+++ b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
@@ -158,7 +158,7 @@ DbUtil::~DbUtil()
{
}
-BLOCK_FUNCTIONS(DbUtil);
+BLOCK_FUNCTIONS(DbUtil)
void
DbUtil::releasePrepare(PreparePtr prepPtr) {
diff --git a/ndb/src/kernel/blocks/dbutil/Makefile.am b/ndb/src/kernel/blocks/dbutil/Makefile.am
index 763875d578f..925356c2f76 100644
--- a/ndb/src/kernel/blocks/dbutil/Makefile.am
+++ b/ndb/src/kernel/blocks/dbutil/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libdbutil.dsp
+
+libdbutil.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libdbutil_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/grep/Grep.cpp b/ndb/src/kernel/blocks/grep/Grep.cpp
index 0e41182348f..e89361dab06 100644
--- a/ndb/src/kernel/blocks/grep/Grep.cpp
+++ b/ndb/src/kernel/blocks/grep/Grep.cpp
@@ -603,7 +603,7 @@ Grep::PSCoord::execCREATE_SUBID_CONF(Signal* signal)
GrepEvent::GrepPS_CreateSubIdConf,
subId,
subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
}
void
@@ -612,7 +612,7 @@ Grep::PSCoord::execCREATE_SUBID_REF(Signal* signal) {
CreateSubscriptionIdRef const * ref =
(CreateSubscriptionIdRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err;
+ GrepError::GE_Code err;
Uint32 sendersBlockRef = signal->getSendersBlockRef();
if(sendersBlockRef == SUMA_REF)
@@ -624,7 +624,7 @@ Grep::PSCoord::execCREATE_SUBID_REF(Signal* signal) {
ndbrequire(false); /* Added since errorcode err unhandled
* TODO: fix correct errorcode
*/
- err= GrepError::NO_ERROR; // remove compiler warning
+ err= GrepError::GE_NO_ERROR; // remove compiler warning
}
SubCoordinatorPtr subPtr;
@@ -824,7 +824,7 @@ Grep::PSPart::execSUB_CREATE_REF(Signal* signal)
jamEntry();
SubCreateRef * const ref = (SubCreateRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
sendRefToPSCoord(signal, *subPtr.p, err /*error*/);
@@ -867,7 +867,7 @@ Grep::PSCoord::execGREP_CREATE_CONF(Signal* signal)
GrepEvent::GrepPS_SubCreateConf,
subId,
subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
@@ -889,7 +889,7 @@ Grep::PSCoord::execGREP_CREATE_REF(Signal* signal)
SubCoordinatorPtr subPtr;
c_runningSubscriptions.getPtr(subPtr, subData);
- sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/);
+ sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/);
}
@@ -1046,7 +1046,7 @@ Grep::PSPart::execSUB_START_REF(Signal* signal)
{
SubStartRef * const ref = (SubStartRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
@@ -1102,7 +1102,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubStartMetaConf,
subId, subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
break;
@@ -1118,7 +1118,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubStartDataConf,
subId, subKey,
- (Uint32)GrepError::NO_ERROR);
+ (Uint32)GrepError::GE_NO_ERROR);
c_subCoordinatorPool.release(subPtr);
@@ -1145,7 +1145,7 @@ Grep::PSCoord::execGREP_START_REF(Signal* signal)
jamEntry();
GrepStartRef * const ref = (GrepStartRef *)signal->getDataPtr();
Uint32 subData = ref->senderData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubCoordinatorPtr subPtr;
@@ -1301,7 +1301,7 @@ Grep::PSPart::execSUB_REMOVE_REF(Signal* signal)
jamEntry();
SubRemoveRef * const ref = (SubRemoveRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- /* GrepError::Code err = (GrepError::Code)ref->err;*/
+ /* GrepError::GE_Code err = (GrepError::GE_Code)ref->err;*/
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subData);
@@ -1342,7 +1342,7 @@ Grep::PSCoord::execGREP_REMOVE_CONF(Signal* signal)
EventReport::GrepSubscriptionInfo,
GrepEvent::GrepPS_SubRemoveConf,
subId, subKey,
- GrepError::NO_ERROR);
+ GrepError::GE_NO_ERROR);
GrepSubRemoveConf * grepConf = (GrepSubRemoveConf *) conf;
grepConf->subscriptionId = subId;
@@ -1375,7 +1375,7 @@ Grep::PSCoord::execGREP_REMOVE_REF(Signal* signal)
subPtr.p = c_runningSubscriptions.getPtr(subPtr.i);
if(subData == subPtr.i)
{
- sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/);
+ sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/);
c_runningSubscriptions.release(subPtr);
return;
}
@@ -1633,7 +1633,7 @@ Grep::PSPart::execSUB_SYNC_REF(Signal* signal) {
jamEntry();
SubSyncRef * const ref = (SubSyncRef *)signal->getDataPtr();
Uint32 subData = ref->subscriberData;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
SubscriptionPtr subPtr;
@@ -1677,7 +1677,7 @@ Grep::PSCoord::execGREP_SYNC_CONF(Signal* signal)
/* @todo Johan: Add firstGCI here. /Lars */
m_grep->sendEventRep(signal, EventReport::GrepSubscriptionInfo,
event, subId, subKey,
- (Uint32)GrepError::NO_ERROR,
+ (Uint32)GrepError::GE_NO_ERROR,
lastGCI);
/*************************
@@ -1707,7 +1707,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) {
GrepSyncRef * const ref = (GrepSyncRef *)signal->getDataPtr();
Uint32 subData = ref->senderData;
SubscriptionData::Part part = (SubscriptionData::Part)ref->part;
- GrepError::Code err = (GrepError::Code)ref->err;
+ GrepError::GE_Code err = (GrepError::GE_Code)ref->err;
SubCoordinatorPtr subPtr;
c_runningSubscriptions.getPtr(subPtr, subData);
sendRefToSS(signal, *subPtr.p, err /*error*/, part);
@@ -1718,7 +1718,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) {
void
Grep::PSCoord::sendRefToSS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part) {
/**
@@ -1843,7 +1843,7 @@ Grep::PSCoord::sendRefToSS(Signal * signal,
void
Grep::PSPart::sendRefToPSCoord(Signal * signal,
Subscription sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part) {
jam();
diff --git a/ndb/src/kernel/blocks/grep/Grep.hpp b/ndb/src/kernel/blocks/grep/Grep.hpp
index eeabac36966..7d3dd916ecc 100644
--- a/ndb/src/kernel/blocks/grep/Grep.hpp
+++ b/ndb/src/kernel/blocks/grep/Grep.hpp
@@ -380,16 +380,16 @@ public:
Uint32 subId,
Uint32 subKey,
BlockReference to,
- GrepError::Code err);
+ GrepError::GE_Code err);
void sendSubRemoveRef_SS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err);
+ GrepError::GE_Code err);
void sendRefToSS(Signal * signal,
SubCoordinator sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part = (SubscriptionData::Part)0);
void setRepRef(BlockReference rr) { m_repRef = rr; };
@@ -496,7 +496,7 @@ public:
void sendRefToPSCoord(Signal * signal,
Subscription sub,
- GrepError::Code err,
+ GrepError::GE_Code err,
SubscriptionData::Part part = (SubscriptionData::Part)0);
//protected:
diff --git a/ndb/src/kernel/blocks/grep/GrepInit.cpp b/ndb/src/kernel/blocks/grep/GrepInit.cpp
index cfb454a1f9b..36855f86568 100644
--- a/ndb/src/kernel/blocks/grep/GrepInit.cpp
+++ b/ndb/src/kernel/blocks/grep/GrepInit.cpp
@@ -132,7 +132,7 @@ Grep::~Grep()
{
}
-BLOCK_FUNCTIONS(Grep);
+BLOCK_FUNCTIONS(Grep)
Grep::PSPart::PSPart(Grep * sb) :
BlockComponent(sb),
diff --git a/ndb/src/kernel/blocks/grep/Makefile.am b/ndb/src/kernel/blocks/grep/Makefile.am
index 31081c7b6a0..6d2b422784b 100644
--- a/ndb/src/kernel/blocks/grep/Makefile.am
+++ b/ndb/src/kernel/blocks/grep/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libgrep.dsp
+
+libgrep.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libgrep_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbcntr/Makefile.am b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
index 9230b55b374..3f24675b2b3 100644
--- a/ndb/src/kernel/blocks/ndbcntr/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
@@ -10,3 +10,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libndbcntr.dsp
+
+libndbcntr.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbcntr_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
index 43044eeebcd..c7b472fc91a 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
@@ -114,4 +114,4 @@ Ndbcntr::~Ndbcntr()
}//Ndbcntr::~Ndbcntr()
-BLOCK_FUNCTIONS(Ndbcntr);
+BLOCK_FUNCTIONS(Ndbcntr)
diff --git a/ndb/src/kernel/blocks/ndbfs/Makefile.am b/ndb/src/kernel/blocks/ndbfs/Makefile.am
index c2b663c5042..a22386f8612 100644
--- a/ndb/src/kernel/blocks/ndbfs/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbfs/Makefile.am
@@ -11,3 +11,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libndbfs.dsp
+
+libndbfs.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libndbfs_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
index 56e3d3abbed..9c943760e31 100644
--- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
@@ -730,7 +730,7 @@ Ndbfs::scanIPC(Signal* signal)
jam();
report(request, signal);
theRequestPool->put(request);
- return &request;
+ return true;
}
return false;
}
@@ -1010,7 +1010,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal)
-BLOCK_FUNCTIONS(Ndbfs);
+BLOCK_FUNCTIONS(Ndbfs)
template class Vector<AsyncFile*>;
template class Vector<OpenFiles::OpenFileItem>;
diff --git a/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp b/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
index d3407e8d4e7..d093089acfc 100644
--- a/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
@@ -196,5 +196,5 @@ VoidFs::execDUMP_STATE_ORD(Signal* signal)
-BLOCK_FUNCTIONS(VoidFs);
+BLOCK_FUNCTIONS(VoidFs)
diff --git a/ndb/src/kernel/blocks/qmgr/Makefile.am b/ndb/src/kernel/blocks/qmgr/Makefile.am
index 52cadb3bd3d..278af2a7865 100644
--- a/ndb/src/kernel/blocks/qmgr/Makefile.am
+++ b/ndb/src/kernel/blocks/qmgr/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libqmgr.dsp
+
+libqmgr.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libqmgr_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp b/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
index b0f1088779c..d6960ce154e 100644
--- a/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
+++ b/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
@@ -100,4 +100,4 @@ Qmgr::~Qmgr()
}//Qmgr::~Qmgr()
-BLOCK_FUNCTIONS(Qmgr);
+BLOCK_FUNCTIONS(Qmgr)
diff --git a/ndb/src/kernel/blocks/suma/Makefile.am b/ndb/src/kernel/blocks/suma/Makefile.am
index 4dacb22af51..5a74dbb74eb 100644
--- a/ndb/src/kernel/blocks/suma/Makefile.am
+++ b/ndb/src/kernel/blocks/suma/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libsuma.dsp
+
+libsuma.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libsuma_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/suma/Suma.cpp b/ndb/src/kernel/blocks/suma/Suma.cpp
index f6d9a0ac35a..836fa28d9ad 100644
--- a/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -3553,7 +3553,7 @@ Suma::Restart::Restart(Suma& s) : suma(s) {
c_okToStart[i] = false;
c_waitingToStart[i] = false;
}
-};
+}
void
Suma::Restart::resetNode(Uint32 sumaRef)
diff --git a/ndb/src/kernel/blocks/suma/SumaInit.cpp b/ndb/src/kernel/blocks/suma/SumaInit.cpp
index 255abd47c94..36217c313af 100644
--- a/ndb/src/kernel/blocks/suma/SumaInit.cpp
+++ b/ndb/src/kernel/blocks/suma/SumaInit.cpp
@@ -188,6 +188,6 @@ Suma::~Suma()
{
}
-BLOCK_FUNCTIONS(Suma);
-BLOCK_FUNCTIONS(SumaParticipant);
+BLOCK_FUNCTIONS(Suma)
+BLOCK_FUNCTIONS(SumaParticipant)
diff --git a/ndb/src/kernel/blocks/trix/Makefile.am b/ndb/src/kernel/blocks/trix/Makefile.am
index 803da815cf0..343063a6283 100644
--- a/ndb/src/kernel/blocks/trix/Makefile.am
+++ b/ndb/src/kernel/blocks/trix/Makefile.am
@@ -7,3 +7,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libtrix.dsp
+
+libtrix.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libtrix_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/blocks/trix/Trix.cpp b/ndb/src/kernel/blocks/trix/Trix.cpp
index 80cf9f88c0d..75bc19b6a20 100644
--- a/ndb/src/kernel/blocks/trix/Trix.cpp
+++ b/ndb/src/kernel/blocks/trix/Trix.cpp
@@ -962,6 +962,6 @@ void Trix::checkParallelism(Signal* signal, SubscriptionRecord* subRec)
}
}
-BLOCK_FUNCTIONS(Trix);
+BLOCK_FUNCTIONS(Trix)
template void append(DataBuffer<15>&,SegmentedSectionPtr,SectionSegmentPool&);
diff --git a/ndb/src/kernel/error/Makefile.am b/ndb/src/kernel/error/Makefile.am
index 4514d2d105c..54f3de2d76d 100644
--- a/ndb/src/kernel/error/Makefile.am
+++ b/ndb/src/kernel/error/Makefile.am
@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: liberror.dsp
+
+liberror.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(liberror_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp
index f34e16318cd..44fe1725c9e 100644
--- a/ndb/src/kernel/main.cpp
+++ b/ndb/src/kernel/main.cpp
@@ -69,11 +69,13 @@ int main(int argc, char** argv)
}
{ // Do configuration
- signal(SIGPIPE, SIG_IGN);
+#ifndef NDB_WIN32
+ signal(SIGPIPE, SIG_IGN);
+#endif
theConfig->fetch_configuration();
}
-
- chdir(NdbConfig_get_path(0));
+
+ my_setwd(NdbConfig_get_path(0), MYF(0));
if (theConfig->getDaemonMode()) {
// Become a daemon
@@ -87,6 +89,7 @@ int main(int argc, char** argv)
}
}
+#ifndef NDB_WIN32
for(pid_t child = fork(); child != 0; child = fork()){
/**
* Parent
@@ -137,6 +140,9 @@ int main(int argc, char** argv)
}
g_eventLogger.info("Angel pid: %d ndb pid: %d", getppid(), getpid());
+#else
+ g_eventLogger.info("Ndb started");
+#endif
theConfig->setupConfiguration();
systemInfo(* theConfig, * theConfig->m_logLevel);
@@ -268,7 +274,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
void
catchsigs(bool ignore){
-#if ! defined NDB_SOFTOSE && !defined NDB_OSE
+#if !defined NDB_WIN32 && !defined NDB_SOFTOSE && !defined NDB_OSE
static const int signals_shutdown[] = {
#ifdef SIGBREAK
@@ -310,7 +316,6 @@ catchsigs(bool ignore){
SIGTRAP
#endif
};
-#endif
static const int signals_ignore[] = {
SIGPIPE
@@ -323,6 +328,7 @@ catchsigs(bool ignore){
handler_register(signals_error[i], handler_error, ignore);
for(i = 0; i < sizeof(signals_ignore)/sizeof(signals_ignore[0]); i++)
handler_register(signals_ignore[i], SIG_IGN, ignore);
+#endif
}
extern "C"
@@ -341,8 +347,10 @@ handler_error(int signum){
if (thread_id != 0 && thread_id == my_thread_id())
{
// Shutdown thread received signal
- signal(signum, SIG_DFL);
+#ifndef NDB_WIN32
+ signal(signum, SIG_DFL);
kill(getpid(), signum);
+#endif
while(true)
NdbSleep_MilliSleep(10);
}
diff --git a/ndb/src/kernel/vm/Callback.hpp b/ndb/src/kernel/vm/Callback.hpp
index bf1ae5968d3..6a619ba7859 100644
--- a/ndb/src/kernel/vm/Callback.hpp
+++ b/ndb/src/kernel/vm/Callback.hpp
@@ -20,12 +20,5 @@
/**
* Block callbacks
*/
-typedef void (SimulatedBlock::* CallbackFunction)(class Signal*,
- Uint32 callbackData,
- Uint32 returnCode);
-struct Callback {
- CallbackFunction m_callbackFunction;
- Uint32 m_callbackData;
-};
#endif
diff --git a/ndb/src/kernel/vm/Configuration.cpp b/ndb/src/kernel/vm/Configuration.cpp
index 931b4da5a17..29255fc9837 100644
--- a/ndb/src/kernel/vm/Configuration.cpp
+++ b/ndb/src/kernel/vm/Configuration.cpp
@@ -46,7 +46,13 @@ extern "C" {
#include <EventLogger.hpp>
extern EventLogger g_eventLogger;
-static const char* opt_connect_str= 0;
+enum ndbd_options {
+ NDB_STD_OPTS_OPTIONS,
+ OPT_INITIAL,
+ OPT_NODAEMON
+};
+
+NDB_STD_OPTS_VARS;
static int _daemon, _no_daemon, _initial, _no_start;
/**
* Arguments to NDB process
@@ -54,7 +60,7 @@ static int _daemon, _no_daemon, _initial, _no_start;
static struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndbd"),
- { "initial", 256,
+ { "initial", OPT_INITIAL,
"Perform initial start of ndbd, including cleaning the file system. "
"Consult documentation before using this",
(gptr*) &_initial, (gptr*) &_initial, 0,
@@ -66,7 +72,7 @@ static struct my_option my_long_options[] =
{ "daemon", 'd', "Start ndbd as daemon (default)",
(gptr*) &_daemon, (gptr*) &_daemon, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
- { "nodaemon", 257,
+ { "nodaemon", OPT_NODAEMON,
"Do not start ndbd as daemon, provided for testing purposes",
(gptr*) &_no_daemon, (gptr*) &_no_daemon, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
@@ -281,19 +287,19 @@ static char * get_and_validate_path(ndb_mgm_configuration_iterator &iter,
memset(buf2, 0,sizeof(buf2));
#ifdef NDB_WIN32
char* szFilePart;
- if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart)
- || (::GetFileAttributes(alloc_path)&FILE_ATTRIBUTE_READONLY))
+ if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart) ||
+ (GetFileAttributes(buf2) & FILE_ATTRIBUTE_READONLY))
#else
- if((::realpath(path, buf2) == NULL)||
+ if((::realpath(path, buf2) == NULL)||
(::access(buf2, W_OK) != 0))
#endif
- {
- ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
- }
-
+ {
+ ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
+ }
+
if (strcmp(&buf2[strlen(buf2) - 1], DIR_SEPARATOR))
strcat(buf2, DIR_SEPARATOR);
-
+
return strdup(buf2);
}
@@ -561,7 +567,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
noOfDBNodes++; // No of NDB processes
if(nodeId > MAX_NDB_NODES){
- snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
+ BaseString::snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
MAX_NDB_NODES);
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
}
@@ -609,8 +615,9 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
Uint32 noOfMetaTables= noOfTables + noOfOrderedIndexes +
noOfUniqueHashIndexes;
- if (noOfMetaTables > MAX_TABLES)
- noOfMetaTables= MAX_TABLES;
+ Uint32 noOfMetaTablesDict= noOfMetaTables;
+ if (noOfMetaTablesDict > MAX_TABLES)
+ noOfMetaTablesDict= MAX_TABLES;
{
/**
@@ -619,8 +626,8 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
cfg.put(CFG_DICT_ATTRIBUTE,
noOfAttributes);
- cfg.put(CFG_DICT_TABLE,
- noOfMetaTables);
+ cfg.put(CFG_DICT_TABLE,
+ noOfMetaTablesDict);
}
diff --git a/ndb/src/kernel/vm/Emulator.cpp b/ndb/src/kernel/vm/Emulator.cpp
index a5897cd4064..adf3c438945 100644
--- a/ndb/src/kernel/vm/Emulator.cpp
+++ b/ndb/src/kernel/vm/Emulator.cpp
@@ -179,12 +179,14 @@ NdbShutdown(NdbShutdownType type,
exit(-1);
#endif
}
-
+
+#ifndef NDB_WIN32
if (simulate_error_during_shutdown) {
kill(getpid(), simulate_error_during_shutdown);
while(true)
NdbSleep_MilliSleep(10);
}
+#endif
globalEmulatorData.theWatchDog->doStop();
diff --git a/ndb/src/kernel/vm/Makefile.am b/ndb/src/kernel/vm/Makefile.am
index 4e9dbe36c78..0dce9285ae3 100644
--- a/ndb/src/kernel/vm/Makefile.am
+++ b/ndb/src/kernel/vm/Makefile.am
@@ -27,3 +27,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%::SCCS/s.%
+
+windoze-dsp: libkernel.dsp
+
+libkernel.dsp: Makefile \
+ $(top_srcdir)/ndb/config/win-lib.am \
+ $(top_srcdir)/ndb/config/win-name \
+ $(top_srcdir)/ndb/config/win-includes \
+ $(top_srcdir)/ndb/config/win-sources \
+ $(top_srcdir)/ndb/config/win-libraries
+ cat $(top_srcdir)/ndb/config/win-lib.am > $@
+ @$(top_srcdir)/ndb/config/win-name $@ $(noinst_LIBRARIES)
+ @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
+ @$(top_srcdir)/ndb/config/win-sources $@ $(libkernel_a_SOURCES)
+ @$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
diff --git a/ndb/src/kernel/vm/Mutex.cpp b/ndb/src/kernel/vm/Mutex.cpp
index 1dbc6e7ec4a..aab9e74312b 100644
--- a/ndb/src/kernel/vm/Mutex.cpp
+++ b/ndb/src/kernel/vm/Mutex.cpp
@@ -19,48 +19,51 @@
#include "Mutex.hpp"
#include <signaldata/UtilLock.hpp>
-MutexManager::MutexManager(class SimulatedBlock & block)
+SimulatedBlock::MutexManager::MutexManager(class SimulatedBlock & block)
: m_block(block),
m_activeMutexes(m_mutexPool) {
}
bool
-MutexManager::setSize(Uint32 maxNoOfActiveMutexes){
+SimulatedBlock::MutexManager::setSize(Uint32 maxNoOfActiveMutexes){
return m_mutexPool.setSize(maxNoOfActiveMutexes);
}
Uint32
-MutexManager::getSize() const {
+SimulatedBlock::MutexManager::getSize() const {
return m_mutexPool.getSize();
}
bool
-MutexManager::seize(ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::seize(ActiveMutexPtr& ptr){
return m_activeMutexes.seize(ptr);
}
void
-MutexManager::release(Uint32 activeMutexPtrI){
+SimulatedBlock::MutexManager::release(Uint32 activeMutexPtrI){
m_activeMutexes.release(activeMutexPtrI);
}
void
-MutexManager::getPtr(ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::getPtr(ActiveMutexPtr& ptr){
m_activeMutexes.getPtr(ptr);
}
BlockReference
-MutexManager::reference() const {
+SimulatedBlock::MutexManager::reference() const {
return m_block.reference();
}
void
-MutexManager::progError(int line, int err_code, const char* extra) {
+SimulatedBlock::MutexManager::progError(int line,
+ int err_code,
+ const char* extra)
+{
m_block.progError(line, err_code, extra);
}
void
-MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
UtilCreateLockReq * req = (UtilCreateLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -78,7 +81,7 @@ MutexManager::create(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
UtilCreateLockRef * ref = (UtilCreateLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
@@ -91,7 +94,7 @@ MutexManager::execUTIL_CREATE_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
UtilCreateLockConf * conf = (UtilCreateLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
@@ -105,7 +108,7 @@ MutexManager::execUTIL_CREATE_LOCK_CONF(Signal* signal){
void
-MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
UtilDestroyLockReq * req = (UtilDestroyLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -123,7 +126,7 @@ MutexManager::destroy(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
UtilDestroyLockRef * ref = (UtilDestroyLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -135,7 +138,7 @@ MutexManager::execUTIL_DESTORY_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
UtilDestroyLockConf * conf = (UtilDestroyLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -148,7 +151,7 @@ MutexManager::execUTIL_DESTORY_LOCK_CONF(Signal* signal){
void
-MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
UtilLockReq * req = (UtilLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -166,7 +169,7 @@ MutexManager::lock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
UtilLockReq * req = (UtilLockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
@@ -184,7 +187,7 @@ MutexManager::trylock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_LOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_LOCK_REF(Signal* signal){
UtilLockRef * ref = (UtilLockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -196,7 +199,7 @@ MutexManager::execUTIL_LOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_LOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_LOCK_CONF(Signal* signal){
UtilLockConf * conf = (UtilLockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -210,7 +213,7 @@ MutexManager::execUTIL_LOCK_CONF(Signal* signal){
}
void
-MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
+SimulatedBlock::MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
UtilUnlockReq * req = (UtilUnlockReq*)signal->getDataPtrSend();
req->senderData = ptr.i;
req->senderRef = m_block.reference();
@@ -227,7 +230,7 @@ MutexManager::unlock(Signal* signal, ActiveMutexPtr& ptr){
}
void
-MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
UtilUnlockRef * ref = (UtilUnlockRef*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, ref->senderData);
@@ -239,7 +242,7 @@ MutexManager::execUTIL_UNLOCK_REF(Signal* signal){
}
void
-MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
+SimulatedBlock::MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
UtilUnlockConf * conf = (UtilUnlockConf*)signal->getDataPtr();
ActiveMutexPtr ptr;
m_activeMutexes.getPtr(ptr, conf->senderData);
@@ -251,8 +254,9 @@ MutexManager::execUTIL_UNLOCK_CONF(Signal* signal){
}
void
-Mutex::release(MutexManager& mgr, Uint32 activePtrI, Uint32 mutexId){
- MutexManager::ActiveMutexPtr ptr;
+Mutex::release(SimulatedBlock::MutexManager& mgr,
+ Uint32 activePtrI, Uint32 mutexId){
+ SimulatedBlock::MutexManager::ActiveMutexPtr ptr;
ptr.i = activePtrI;
mgr.getPtr(ptr);
if(ptr.p->m_gsn == 0 && ptr.p->m_mutexId == mutexId){
@@ -272,7 +276,8 @@ Mutex::unlock(){
if(!m_ptr.isNull()){
m_mgr.getPtr(m_ptr);
if(m_ptr.p->m_mutexId == m_mutexId){
- Callback c = { &SimulatedBlock::ignoreMutexUnlockCallback, m_ptr.i };
+ SimulatedBlock::Callback c =
+ { &SimulatedBlock::ignoreMutexUnlockCallback, m_ptr.i };
m_ptr.p->m_callback = c;
m_mgr.unlock(m_signal, m_ptr);
m_ptr.setNull(); // Remove reference
diff --git a/ndb/src/kernel/vm/Mutex.hpp b/ndb/src/kernel/vm/Mutex.hpp
index 40e3fb56b4f..7a16046188c 100644
--- a/ndb/src/kernel/vm/Mutex.hpp
+++ b/ndb/src/kernel/vm/Mutex.hpp
@@ -22,63 +22,6 @@
class Mutex;
-class MutexManager {
- friend class Mutex;
- friend class SimulatedBlock;
- friend class DbUtil;
-public:
- MutexManager(class SimulatedBlock &);
-
- bool setSize(Uint32 maxNoOfActiveMutexes);
- Uint32 getSize() const ; // Get maxNoOfActiveMutexes
-
-private:
- /**
- * core interface
- */
- struct ActiveMutex {
- Uint32 m_gsn; // state
- Uint32 m_mutexId;
- Uint32 m_mutexKey;
- Callback m_callback;
- union {
- Uint32 nextPool;
- Uint32 nextList;
- };
- Uint32 prevList;
- };
- typedef Ptr<ActiveMutex> ActiveMutexPtr;
-
- bool seize(ActiveMutexPtr& ptr);
- void release(Uint32 activeMutexPtrI);
-
- void getPtr(ActiveMutexPtr& ptr);
-
- void create(Signal*, ActiveMutexPtr&);
- void destroy(Signal*, ActiveMutexPtr&);
- void lock(Signal*, ActiveMutexPtr&);
- void trylock(Signal*, ActiveMutexPtr&);
- void unlock(Signal*, ActiveMutexPtr&);
-
-private:
- void execUTIL_CREATE_LOCK_REF(Signal* signal);
- void execUTIL_CREATE_LOCK_CONF(Signal* signal);
- void execUTIL_DESTORY_LOCK_REF(Signal* signal);
- void execUTIL_DESTORY_LOCK_CONF(Signal* signal);
- void execUTIL_LOCK_REF(Signal* signal);
- void execUTIL_LOCK_CONF(Signal* signal);
- void execUTIL_UNLOCK_REF(Signal* signal);
- void execUTIL_UNLOCK_CONF(Signal* signal);
-
- SimulatedBlock & m_block;
- ArrayPool<ActiveMutex> m_mutexPool;
- DLList<ActiveMutex> m_activeMutexes;
-
- BlockReference reference() const;
- void progError(int line, int err_code, const char* extra = 0);
-};
-
-
/**
* MutexHandle - A "reference" to a mutex
* - Should be used together with Mutex
@@ -89,7 +32,7 @@ public:
MutexHandle(Uint32 id);
bool isNull() const;
- void release(MutexManager & mgr);
+ void release(SimulatedBlock::MutexManager & mgr);
private:
const Uint32 m_mutexId;
@@ -106,7 +49,7 @@ public:
MutexHandle2();
bool isNull() const;
- void release(MutexManager & mgr);
+ void release(SimulatedBlock::MutexManager & mgr);
private:
Uint32 m_activeMutexPtrI;
@@ -117,33 +60,34 @@ private:
*/
class Mutex {
public:
- Mutex(Signal*, MutexManager & mgr, MutexHandle &);
+ Mutex(Signal*, SimulatedBlock::MutexManager & mgr, MutexHandle &);
template<Uint32 MutexId>
- Mutex(Signal*, MutexManager & mgr, MutexHandle2<MutexId> &);
+ Mutex(Signal*, SimulatedBlock::MutexManager & mgr, MutexHandle2<MutexId> &);
~Mutex();
void release();
bool isNull() const ;
- bool lock(Callback & callback);
- bool trylock(Callback & callback);
- void unlock(Callback & callback);
+ bool lock(SimulatedBlock::Callback & callback);
+ bool trylock(SimulatedBlock::Callback & callback);
+ void unlock(SimulatedBlock::Callback & callback);
void unlock(); // Ignore callback
- bool create(Callback & callback);
- bool destroy(Callback & callback);
+ bool create(SimulatedBlock::Callback & callback);
+ bool destroy(SimulatedBlock::Callback & callback);
private:
Signal* m_signal;
- MutexManager & m_mgr;
+ SimulatedBlock::MutexManager & m_mgr;
const Uint32 m_mutexId;
Uint32 & m_srcPtrI;
- MutexManager::ActiveMutexPtr m_ptr;
+ SimulatedBlock::MutexManager::ActiveMutexPtr m_ptr;
public:
- static void release(MutexManager&, Uint32 activePtrI, Uint32 mutexId);
+ static void release(SimulatedBlock::MutexManager&,
+ Uint32 activePtrI, Uint32 mutexId);
};
inline
@@ -159,7 +103,7 @@ MutexHandle::isNull() const {
inline
void
-MutexHandle::release(MutexManager & mgr){
+MutexHandle::release(SimulatedBlock::MutexManager & mgr){
if(!isNull()){
Mutex::release(mgr, m_activeMutexPtrI, m_mutexId);
m_activeMutexPtrI = RNIL;
@@ -183,7 +127,7 @@ MutexHandle2<MutexId>::isNull() const {
template<Uint32 MutexId>
inline
void
-MutexHandle2<MutexId>::release(MutexManager & mgr){
+MutexHandle2<MutexId>::release(SimulatedBlock::MutexManager & mgr){
if(!isNull()){
Mutex::release(mgr, m_activeMutexPtrI, MutexId);
m_activeMutexPtrI = RNIL;
@@ -192,7 +136,8 @@ MutexHandle2<MutexId>::release(MutexManager & mgr){
inline
-Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle & mh)
+Mutex::Mutex(Signal* signal, SimulatedBlock::MutexManager & mgr,
+ MutexHandle & mh)
: m_signal(signal),
m_mgr(mgr),
m_mutexId(mh.m_mutexId),
@@ -204,7 +149,8 @@ Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle & mh)
template<Uint32 MutexId>
inline
-Mutex::Mutex(Signal* signal, MutexManager & mgr, MutexHandle2<MutexId> & mh)
+Mutex::Mutex(Signal* signal, SimulatedBlock::MutexManager & mgr,
+ MutexHandle2<MutexId> & mh)
: m_signal(signal),
m_mgr(mgr),
m_mutexId(MutexId),
@@ -236,7 +182,7 @@ Mutex::isNull() const {
inline
bool
-Mutex::lock(Callback & callback){
+Mutex::lock(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -253,7 +199,7 @@ Mutex::lock(Callback & callback){
inline
bool
-Mutex::trylock(Callback & callback){
+Mutex::trylock(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -270,7 +216,7 @@ Mutex::trylock(Callback & callback){
inline
void
-Mutex::unlock(Callback & callback){
+Mutex::unlock(SimulatedBlock::Callback & callback){
if(!m_ptr.isNull()){
m_mgr.getPtr(m_ptr);
if(m_ptr.p->m_mutexId == m_mutexId){
@@ -285,7 +231,7 @@ Mutex::unlock(Callback & callback){
inline
bool
-Mutex::create(Callback & callback){
+Mutex::create(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
@@ -302,7 +248,7 @@ Mutex::create(Callback & callback){
inline
bool
-Mutex::destroy(Callback & callback){
+Mutex::destroy(SimulatedBlock::Callback & callback){
if(m_ptr.isNull()){
if(m_mgr.seize(m_ptr)){
m_ptr.p->m_mutexId = m_mutexId;
diff --git a/ndb/src/kernel/vm/SectionReader.cpp b/ndb/src/kernel/vm/SectionReader.cpp
index 9e1cbc855e6..dd474a49e50 100644
--- a/ndb/src/kernel/vm/SectionReader.cpp
+++ b/ndb/src/kernel/vm/SectionReader.cpp
@@ -26,7 +26,7 @@
#endif
SectionReader::SectionReader
-(class SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
+(struct SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
: m_pool(pool)
{
if(ptr.p == 0){
diff --git a/ndb/src/kernel/vm/SectionReader.hpp b/ndb/src/kernel/vm/SectionReader.hpp
index 17eade24a66..b51006b6128 100644
--- a/ndb/src/kernel/vm/SectionReader.hpp
+++ b/ndb/src/kernel/vm/SectionReader.hpp
@@ -21,7 +21,7 @@
class SectionReader {
public:
- SectionReader(class SegmentedSectionPtr &,
+ SectionReader(struct SegmentedSectionPtr &,
class SectionSegmentPool &);
void reset();
diff --git a/ndb/src/kernel/vm/SimplePropertiesSection.cpp b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
index d442ff2e698..070563be36b 100644
--- a/ndb/src/kernel/vm/SimplePropertiesSection.cpp
+++ b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
@@ -19,7 +19,7 @@
#include "LongSignal.hpp"
SimplePropertiesSectionReader::SimplePropertiesSectionReader
-(class SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
+(struct SegmentedSectionPtr & ptr, class SectionSegmentPool & pool)
: m_pool(pool)
{
if(ptr.p == 0){
@@ -190,7 +190,7 @@ SimplePropertiesSectionWriter::putWords(const Uint32 * src, Uint32 len){
}
void
-SimplePropertiesSectionWriter::getPtr(class SegmentedSectionPtr & dst){
+SimplePropertiesSectionWriter::getPtr(struct SegmentedSectionPtr & dst){
// Set last ptr and size
if(m_pos >= 0){
dst.p = m_head;
diff --git a/ndb/src/kernel/vm/SimulatedBlock.cpp b/ndb/src/kernel/vm/SimulatedBlock.cpp
index e6b97771d36..94fd5769406 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.cpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.cpp
@@ -1598,7 +1598,7 @@ SimulatedBlock::sendFragmentedSignal(NodeReceiverGroup rg,
}
}
-Callback SimulatedBlock::TheEmptyCallback = {0, 0};
+SimulatedBlock::Callback SimulatedBlock::TheEmptyCallback = {0, 0};
void
SimulatedBlock::sendFragmentedSignal(BlockReference ref,
diff --git a/ndb/src/kernel/vm/SimulatedBlock.hpp b/ndb/src/kernel/vm/SimulatedBlock.hpp
index 7972cb39746..cff19734368 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.hpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.hpp
@@ -41,7 +41,6 @@
#include "ArrayPool.hpp"
#include "DLHashTable.hpp"
#include "Callback.hpp"
-#include "Mutex.hpp"
#include "SafeCounter.hpp"
#include "MetaData.hpp"
@@ -77,7 +76,6 @@ typedef struct NewVar
} NewVARIABLE; /* 128 bits */
class SimulatedBlock {
- friend class MutexManager;
friend class SafeCounter;
friend class SafeCounterManager;
friend struct UpgradeStartup;
@@ -104,6 +102,14 @@ public:
*
*/
inline void executeFunction(GlobalSignalNumber gsn, Signal* signal);
+public:
+ typedef void (SimulatedBlock::* CallbackFunction)(class Signal*,
+ Uint32 callbackData,
+ Uint32 returnCode);
+ struct Callback {
+ CallbackFunction m_callbackFunction;
+ Uint32 m_callbackData;
+ };
protected:
static Callback TheEmptyCallback;
void execute(Signal* signal, Callback & c, Uint32 returnCode);
@@ -405,7 +411,64 @@ private:
DLList<FragmentSendInfo> c_linearFragmentSendList;
DLList<FragmentSendInfo> c_segmentedFragmentSendList;
-public:
+public:
+ class MutexManager {
+ friend class Mutex;
+ friend class SimulatedBlock;
+ friend class DbUtil;
+ public:
+ MutexManager(class SimulatedBlock &);
+
+ bool setSize(Uint32 maxNoOfActiveMutexes);
+ Uint32 getSize() const ; // Get maxNoOfActiveMutexes
+
+ private:
+ /**
+ * core interface
+ */
+ struct ActiveMutex {
+ Uint32 m_gsn; // state
+ Uint32 m_mutexId;
+ Uint32 m_mutexKey;
+ Callback m_callback;
+ union {
+ Uint32 nextPool;
+ Uint32 nextList;
+ };
+ Uint32 prevList;
+ };
+ typedef Ptr<ActiveMutex> ActiveMutexPtr;
+
+ bool seize(ActiveMutexPtr& ptr);
+ void release(Uint32 activeMutexPtrI);
+
+ void getPtr(ActiveMutexPtr& ptr);
+
+ void create(Signal*, ActiveMutexPtr&);
+ void destroy(Signal*, ActiveMutexPtr&);
+ void lock(Signal*, ActiveMutexPtr&);
+ void trylock(Signal*, ActiveMutexPtr&);
+ void unlock(Signal*, ActiveMutexPtr&);
+
+ private:
+ void execUTIL_CREATE_LOCK_REF(Signal* signal);
+ void execUTIL_CREATE_LOCK_CONF(Signal* signal);
+ void execUTIL_DESTORY_LOCK_REF(Signal* signal);
+ void execUTIL_DESTORY_LOCK_CONF(Signal* signal);
+ void execUTIL_LOCK_REF(Signal* signal);
+ void execUTIL_LOCK_CONF(Signal* signal);
+ void execUTIL_UNLOCK_REF(Signal* signal);
+ void execUTIL_UNLOCK_CONF(Signal* signal);
+
+ SimulatedBlock & m_block;
+ ArrayPool<ActiveMutex> m_mutexPool;
+ DLList<ActiveMutex> m_activeMutexes;
+
+ BlockReference reference() const;
+ void progError(int line, int err_code, const char* extra = 0);
+ };
+
+ friend class MutexManager;
MutexManager c_mutexMgr;
void ignoreMutexUnlockCallback(Signal* signal, Uint32 ptrI, Uint32 retVal);
@@ -688,5 +751,7 @@ BLOCK::addRecSignal(GlobalSignalNumber gsn, ExecSignalLocal f, bool force){ \
addRecSignalImpl(gsn, (ExecFunction)f, force);\
}
+#include "Mutex.hpp"
+
#endif