diff options
Diffstat (limited to 'ndb')
40 files changed, 156 insertions, 124 deletions
diff --git a/ndb/include/logger/LogHandler.hpp b/ndb/include/logger/LogHandler.hpp index 8b9aa43d7a9..efb87bb3104 100644 --- a/ndb/include/logger/LogHandler.hpp +++ b/ndb/include/logger/LogHandler.hpp @@ -135,7 +135,7 @@ public: * * @param str the error string. */ - void setErrorStr(char* str); + void setErrorStr(const char* str); /** * Parse logstring parameters diff --git a/ndb/include/ndb_global.h.in b/ndb/include/ndb_global.h.in index 122b0edc400..f1eed73f71a 100644 --- a/ndb/include/ndb_global.h.in +++ b/ndb/include/ndb_global.h.in @@ -132,4 +132,10 @@ extern "C" { #define PATH_MAX 1024 #endif +#if defined(_lint) || defined(FORCE_INIT_OF_VARS) +#define LINT_SET_PTR = {0,0} +#else +#define LINT_SET_PTR +#endif + #endif diff --git a/ndb/include/util/InputStream.hpp b/ndb/include/util/InputStream.hpp index 4d7d06aeaa3..56c43686df1 100644 --- a/ndb/include/util/InputStream.hpp +++ b/ndb/include/util/InputStream.hpp @@ -25,6 +25,7 @@ */ class InputStream { public: + virtual ~InputStream() {} virtual char* gets(char * buf, int bufLen) = 0; }; diff --git a/ndb/include/util/OutputStream.hpp b/ndb/include/util/OutputStream.hpp index c7e009d4537..a834b577bb3 100644 --- a/ndb/include/util/OutputStream.hpp +++ b/ndb/include/util/OutputStream.hpp @@ -25,6 +25,7 @@ */ class OutputStream { public: + virtual ~OutputStream() {} virtual int print(const char * fmt, ...) = 0; virtual int println(const char * fmt, ...) = 0; virtual void flush() {}; diff --git a/ndb/include/util/SimpleProperties.hpp b/ndb/include/util/SimpleProperties.hpp index 438426fb62b..b29e65e21da 100644 --- a/ndb/include/util/SimpleProperties.hpp +++ b/ndb/include/util/SimpleProperties.hpp @@ -151,6 +151,7 @@ public: ValueType m_type; protected: Reader(); + virtual ~Reader() {} virtual void reset() = 0; virtual bool step(Uint32 len) = 0; @@ -169,6 +170,7 @@ public: bool add(Uint16 key, const char * value); bool add(Uint16 key, const void* value, int len); protected: + virtual ~Writer() {} virtual bool reset() = 0; virtual bool putWord(Uint32 val) = 0; virtual bool putWords(const Uint32 * src, Uint32 len) = 0; @@ -184,6 +186,7 @@ class SimplePropertiesLinearReader : public SimpleProperties::Reader { public: SimplePropertiesLinearReader(const Uint32 * src, Uint32 len); + virtual ~SimplePropertiesLinearReader() {} virtual void reset(); virtual bool step(Uint32 len); virtual bool getWord(Uint32 * dst); @@ -202,6 +205,7 @@ class LinearWriter : public SimpleProperties::Writer { public: LinearWriter(Uint32 * src, Uint32 len); + virtual ~LinearWriter() {} virtual bool reset(); virtual bool putWord(Uint32 val); virtual bool putWords(const Uint32 * src, Uint32 len); @@ -219,6 +223,7 @@ class UtilBufferWriter : public SimpleProperties::Writer { public: UtilBufferWriter(class UtilBuffer & buf); + virtual ~UtilBufferWriter() {} virtual bool reset(); virtual bool putWord(Uint32 val); virtual bool putWords(const Uint32 * src, Uint32 len); @@ -238,6 +243,7 @@ public: SimplePropertiesSectionReader(struct SegmentedSectionPtr &, class SectionSegmentPool &); + virtual ~SimplePropertiesSectionReader() {} virtual void reset(); virtual bool step(Uint32 len); virtual bool getWord(Uint32 * dst); @@ -270,6 +276,7 @@ class SimplePropertiesSectionWriter : public SimpleProperties::Writer { public: SimplePropertiesSectionWriter(class SectionSegmentPool &); + virtual ~SimplePropertiesSectionWriter() {} virtual bool reset(); virtual bool putWord(Uint32 val); virtual bool putWords(const Uint32 * src, Uint32 len); diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp index c6f02a7807a..8027a6bd347 100644 --- a/ndb/src/common/debugger/EventLogger.cpp +++ b/ndb/src/common/debugger/EventLogger.cpp @@ -116,8 +116,7 @@ void getTextNDBStopForced(QQQQ) { int sphase = theData[4]; int extra = theData[5]; getRestartAction(theData[1],action_str); - if (signal) - reason_str.appfmt(" Initiated by signal %d.", signum); + reason_str.appfmt(" Initiated by signal %d.", signum); if (error) { ndbd_exit_classification cl; diff --git a/ndb/src/common/debugger/signaldata/BackupSignalData.cpp b/ndb/src/common/debugger/signaldata/BackupSignalData.cpp index 27fed22ac72..7410db44aa3 100644 --- a/ndb/src/common/debugger/signaldata/BackupSignalData.cpp +++ b/ndb/src/common/debugger/signaldata/BackupSignalData.cpp @@ -124,6 +124,9 @@ printABORT_BACKUP_ORD(FILE * out, const Uint32 * data, Uint32 len, Uint16 b){ sig->backupPtr, sig->backupId); return true; break; + case AbortBackupOrd::AbortScan: + case AbortBackupOrd::IncompatibleVersions: + return false; } return false; } diff --git a/ndb/src/common/logger/LogHandler.cpp b/ndb/src/common/logger/LogHandler.cpp index c11f962d4fb..47333f81812 100644 --- a/ndb/src/common/logger/LogHandler.cpp +++ b/ndb/src/common/logger/LogHandler.cpp @@ -164,9 +164,9 @@ LogHandler::getErrorStr() } void -LogHandler::setErrorStr(char* str) +LogHandler::setErrorStr(const char* str) { - m_errorStr= str; + m_errorStr= (char*) str; } bool diff --git a/ndb/src/common/portlib/NdbMutex.c b/ndb/src/common/portlib/NdbMutex.c index 4a170d87e5c..f0a1614ba8e 100644 --- a/ndb/src/common/portlib/NdbMutex.c +++ b/ndb/src/common/portlib/NdbMutex.c @@ -28,7 +28,7 @@ NdbMutex* NdbMutex_Create(void) DBUG_ENTER("NdbMutex_Create"); pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex)); - DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex)); + DBUG_PRINT("info",("NdbMem_Allocate 0x%lx", (long) pNdbMutex)); if (pNdbMutex == NULL) DBUG_RETURN(NULL); @@ -50,7 +50,7 @@ int NdbMutex_Destroy(NdbMutex* p_mutex) result = pthread_mutex_destroy(p_mutex); - DBUG_PRINT("info",("NdbMem_Free 0x%lx",p_mutex)); + DBUG_PRINT("info",("NdbMem_Free 0x%lx", (long) p_mutex)); NdbMem_Free(p_mutex); DBUG_RETURN(result); diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c index 48d00956ec2..67c8f6faf50 100644 --- a/ndb/src/common/portlib/NdbThread.c +++ b/ndb/src/common/portlib/NdbThread.c @@ -122,7 +122,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func, assert(result==0); pthread_attr_destroy(&thread_attr); - DBUG_PRINT("exit",("ret: %lx", tmpThread)); + DBUG_PRINT("exit",("ret: 0x%lx", (long) tmpThread)); DBUG_RETURN(tmpThread); } @@ -131,7 +131,7 @@ void NdbThread_Destroy(struct NdbThread** p_thread) { DBUG_ENTER("NdbThread_Destroy"); if (*p_thread != NULL){ - DBUG_PRINT("enter",("*p_thread: %lx", * p_thread)); + DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread)); free(* p_thread); * p_thread = 0; } diff --git a/ndb/src/common/transporter/Transporter.cpp b/ndb/src/common/transporter/Transporter.cpp index 383456f1077..b2ee75e4754 100644 --- a/ndb/src/common/transporter/Transporter.cpp +++ b/ndb/src/common/transporter/Transporter.cpp @@ -39,8 +39,8 @@ Transporter::Transporter(TransporterRegistry &t_reg, int _byteorder, bool _compression, bool _checksum, bool _signalId) : m_s_port(s_port), remoteNodeId(rNodeId), localNodeId(lNodeId), - isServer(lNodeId==serverNodeId), isMgmConnection(_isMgmConnection), - m_packer(_signalId, _checksum), + isServer(lNodeId==serverNodeId), + m_packer(_signalId, _checksum), isMgmConnection(_isMgmConnection), m_type(_type), m_transporter_registry(t_reg) { diff --git a/ndb/src/cw/cpcd/CPCD.hpp b/ndb/src/cw/cpcd/CPCD.hpp index aecc43150c4..3a69a03aa3f 100644 --- a/ndb/src/cw/cpcd/CPCD.hpp +++ b/ndb/src/cw/cpcd/CPCD.hpp @@ -63,6 +63,7 @@ struct CPCEvent { struct EventSubscriber { virtual void report(const CPCEvent &) = 0; + virtual ~EventSubscriber() {} }; /** diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp index b00b1169095..8f3f6ffe55c 100644 --- a/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/ndb/src/kernel/blocks/backup/Backup.cpp @@ -272,7 +272,7 @@ Backup::execCONTINUEB(Signal* signal) Uint32 tabPtr_I = Tdata2; Uint32 fragPtr_I = signal->theData[3]; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptr_I); if (tabPtr_I == RNIL) @@ -309,7 +309,7 @@ Backup::execCONTINUEB(Signal* signal) fragInfo->NoOfRecordsLow = htonl(fragPtr.p->noOfRecords & 0xFFFFFFFF); fragInfo->NoOfRecordsHigh = htonl(fragPtr.p->noOfRecords >> 32); fragInfo->FilePosLow = htonl(0 & 0xFFFFFFFF); - fragInfo->FilePosHigh = htonl(0 >> 32); + fragInfo->FilePosHigh = htonl(0); filePtr.p->operation.dataBuffer.updateWritePtr(sz); @@ -341,7 +341,7 @@ Backup::execCONTINUEB(Signal* signal) case BackupContinueB::BUFFER_UNDERFLOW: { jam(); - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, Tdata1); checkFile(signal, filePtr); return; @@ -350,7 +350,7 @@ Backup::execCONTINUEB(Signal* signal) case BackupContinueB::BUFFER_FULL_SCAN: { jam(); - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, Tdata1); checkScan(signal, filePtr); return; @@ -359,7 +359,7 @@ Backup::execCONTINUEB(Signal* signal) case BackupContinueB::BUFFER_FULL_FRAG_COMPLETE: { jam(); - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, Tdata1); fragmentCompleted(signal, filePtr); return; @@ -368,7 +368,7 @@ Backup::execCONTINUEB(Signal* signal) case BackupContinueB::BUFFER_FULL_META: { jam(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, Tdata1); BackupFilePtr filePtr; @@ -377,7 +377,7 @@ Backup::execCONTINUEB(Signal* signal) if(buf.getFreeSize() + buf.getMinRead() < buf.getUsableSize()) { jam(); - TablePtr tabPtr; + TablePtr tabPtr LINT_SET_PTR; c_tablePool.getPtr(tabPtr, Tdata2); DEBUG_OUT("Backup - Buffer full - " << buf.getFreeSize() @@ -392,7 +392,7 @@ Backup::execCONTINUEB(Signal* signal) return; }//if - TablePtr tabPtr; + TablePtr tabPtr LINT_SET_PTR; c_tablePool.getPtr(tabPtr, Tdata2); GetTabInfoReq * req = (GetTabInfoReq *)signal->getDataPtrSend(); req->senderRef = reference(); @@ -912,6 +912,9 @@ Backup::checkNodeFail(Signal* signal, #endif Uint32 gsn, len, pos; + LINT_INIT(gsn); + LINT_INIT(len); + LINT_INIT(pos); ptr.p->nodes.bitANDC(mask); switch(ptr.p->masterData.gsn){ case GSN_DEFINE_BACKUP_REQ: @@ -1099,7 +1102,7 @@ Backup::execBACKUP_REQ(Signal* signal) void Backup::execUTIL_SEQUENCE_REF(Signal* signal) { - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; jamEntry(); UtilSequenceRef * utilRef = (UtilSequenceRef*)signal->getDataPtr(); ptr.i = utilRef->senderData; @@ -1153,7 +1156,7 @@ Backup::execUTIL_SEQUENCE_CONF(Signal* signal) return; } - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; ptr.i = conf->senderData; c_backupPool.getPtr(ptr); @@ -1194,7 +1197,7 @@ Backup::defineBackupMutex_locked(Signal* signal, Uint32 ptrI, Uint32 retVal){ jamEntry(); ndbrequire(retVal == 0); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; ptr.i = ptrI; c_backupPool.getPtr(ptr); @@ -1215,7 +1218,7 @@ Backup::dictCommitTableMutex_locked(Signal* signal, Uint32 ptrI,Uint32 retVal) /** * We now have both the mutexes */ - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; ptr.i = ptrI; c_backupPool.getPtr(ptr); @@ -1320,7 +1323,7 @@ Backup::execDEFINE_BACKUP_REF(Signal* signal) //const Uint32 backupId = ref->backupId; const Uint32 nodeId = ref->nodeId; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->setErrorCode(ref->errorCode); @@ -1337,7 +1340,7 @@ Backup::execDEFINE_BACKUP_CONF(Signal* signal) //const Uint32 backupId = conf->backupId; const Uint32 nodeId = refToNode(signal->senderBlockRef()); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); if (ERROR_INSERTED(10024)) @@ -1508,7 +1511,7 @@ Backup::execCREATE_TRIG_REF(Signal* signal) const Uint32 ptrI = ref->getConnectionPtr(); const Uint32 tableId = ref->getTableId(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); /** @@ -1623,7 +1626,7 @@ Backup::execSTART_BACKUP_REF(Signal* signal) const Uint32 signalNo = ref->signalNo; const Uint32 nodeId = ref->nodeId; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->setErrorCode(ref->errorCode); @@ -1641,7 +1644,7 @@ Backup::execSTART_BACKUP_CONF(Signal* signal) const Uint32 signalNo = conf->signalNo; const Uint32 nodeId = refToNode(signal->senderBlockRef()); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); startBackupReply(signal, ptr, nodeId, signalNo); @@ -1671,7 +1674,7 @@ Backup::startBackupReply(Signal* signal, BackupRecordPtr ptr, return; } - TablePtr tabPtr; + TablePtr tabPtr LINT_SET_PTR; c_tablePool.getPtr(tabPtr, ptr.p->masterData.startBackup.tablePtr); for(Uint32 i = 0; i<StartBackupReq::MaxTableTriggers; i++) { jam(); @@ -1765,7 +1768,7 @@ Backup::execALTER_TRIG_CONF(Signal* signal) AlterTrigConf* conf = (AlterTrigConf*)signal->getDataPtr(); const Uint32 ptrI = conf->getConnectionPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); alterTrigReply(signal, ptr); @@ -1779,7 +1782,7 @@ Backup::execALTER_TRIG_REF(Signal* signal) AlterTrigRef* ref = (AlterTrigRef*)signal->getDataPtr(); const Uint32 ptrI = ref->getConnectionPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->setErrorCode(ref->getErrorCode()); @@ -1823,7 +1826,7 @@ Backup::execWAIT_GCP_REF(Signal* signal) WaitGCPRef * ref = (WaitGCPRef*)signal->getDataPtr(); const Uint32 ptrI = ref->senderData; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ndbrequire(ptr.p->masterRef == reference()); @@ -1847,7 +1850,7 @@ Backup::execWAIT_GCP_CONF(Signal* signal){ const Uint32 ptrI = conf->senderData; const Uint32 gcp = conf->gcp; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ndbrequire(ptr.p->masterRef == reference()); @@ -2057,7 +2060,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal) //const Uint32 backupId = ref->backupId; const Uint32 nodeId = ref->nodeId; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); TablePtr tabPtr; @@ -2206,7 +2209,7 @@ Backup::execDROP_TRIG_REF(Signal* signal) DropTrigRef* ref = (DropTrigRef*)signal->getDataPtr(); const Uint32 ptrI = ref->getConnectionPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); //ndbrequire(ref->getErrorCode() == DropTrigRef::NoSuchTrigger); @@ -2221,7 +2224,7 @@ Backup::execDROP_TRIG_CONF(Signal* signal) DropTrigConf* conf = (DropTrigConf*)signal->getDataPtr(); const Uint32 ptrI = conf->getConnectionPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); dropTrigReply(signal, ptr); @@ -2261,7 +2264,7 @@ Backup::execSTOP_BACKUP_REF(Signal* signal) //const Uint32 backupId = ref->backupId; const Uint32 nodeId = ref->nodeId; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->setErrorCode(ref->errorCode); @@ -2296,7 +2299,7 @@ Backup::execSTOP_BACKUP_CONF(Signal* signal) //const Uint32 backupId = conf->backupId; const Uint32 nodeId = refToNode(signal->senderBlockRef()); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->noOfLogBytes += conf->noOfLogBytes; @@ -2485,7 +2488,7 @@ Backup::execDEFINE_BACKUP_REQ(Signal* signal) DefineBackupReq* req = (DefineBackupReq*)signal->getDataPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; const Uint32 ptrI = req->backupPtr; const Uint32 backupId = req->backupId; const BlockReference senderRef = req->senderRef; @@ -2663,7 +2666,7 @@ Backup::execLIST_TABLES_CONF(Signal* signal) ListTablesConf* conf = (ListTablesConf*)signal->getDataPtr(); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, conf->senderData); const Uint32 len = signal->length() - ListTablesConf::HeaderLength; @@ -2711,7 +2714,7 @@ Backup::openFiles(Signal* signal, BackupRecordPtr ptr) { jam(); - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; FsOpenReq * req = (FsOpenReq *)signal->getDataPtrSend(); req->userReference = reference(); @@ -2776,10 +2779,10 @@ Backup::execFSOPENREF(Signal* signal) const Uint32 userPtr = ref->userPointer; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, userPtr); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); ptr.p->setErrorCode(ref->errorCode); openFilesReply(signal, ptr, filePtr); @@ -2795,11 +2798,11 @@ Backup::execFSOPENCONF(Signal* signal) const Uint32 userPtr = conf->userPointer; const Uint32 filePointer = conf->filePointer; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, userPtr); filePtr.p->filePointer = filePointer; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); ndbrequire(filePtr.p->fileOpened == 0); @@ -2957,7 +2960,7 @@ Backup::execGET_TABINFOREF(Signal* signal) GetTabInfoRef * ref = (GetTabInfoRef*)signal->getDataPtr(); const Uint32 senderData = ref->senderData; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, senderData); defineBackupRef(signal, ptr, ref->errorCode); @@ -2978,7 +2981,7 @@ Backup::execGET_TABINFO_CONF(Signal* signal) const Uint32 len = conf->totalLen; const Uint32 senderData = conf->senderData; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, senderData); SegmentedSectionPtr dictTabInfoPtr; @@ -3212,7 +3215,7 @@ Backup::execDI_FCOUNTCONF(Signal* signal) fragPtr.p->scanned = 0; fragPtr.p->scanning = 0; fragPtr.p->tableId = tableId; - fragPtr.p->node = RNIL; + fragPtr.p->node = 0; }//for /** @@ -3421,7 +3424,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal) /** * Get file */ - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr); ndbrequire(filePtr.p->backupPtr == ptrI); @@ -3553,12 +3556,12 @@ Backup::execTRANSID_AI(Signal* signal) //const Uint32 transId2 = signal->theData[2]; const Uint32 dataLen = signal->length() - 3; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); OperationRecord & op = filePtr.p->operation; - TablePtr tabPtr; + TablePtr tabPtr LINT_SET_PTR; c_tablePool.getPtr(tabPtr, op.tablePtr); Table & table = * tabPtr.p; @@ -3752,7 +3755,7 @@ Backup::execSCAN_FRAGREF(Signal* signal) ScanFragRef * ref = (ScanFragRef*)signal->getDataPtr(); const Uint32 filePtrI = ref->senderData; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); filePtr.p->errorCode = ref->errorCode; @@ -3771,7 +3774,7 @@ Backup::execSCAN_FRAGCONF(Signal* signal) ScanFragConf * conf = (ScanFragConf*)signal->getDataPtr(); const Uint32 filePtrI = conf->senderData; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); OperationRecord & op = filePtr.p->operation; @@ -3812,7 +3815,7 @@ Backup::fragmentCompleted(Signal* signal, BackupFilePtr filePtr) filePtr.p->scanRunning = 0; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); BackupFragmentConf * conf = (BackupFragmentConf*)signal->getDataPtrSend(); @@ -3835,7 +3838,7 @@ Backup::fragmentCompleted(Signal* signal, BackupFilePtr filePtr) void Backup::backupFragmentRef(Signal * signal, BackupFilePtr filePtr) { - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); ptr.p->m_gsn = GSN_BACKUP_FRAGMENT_REF; @@ -3891,7 +3894,7 @@ Backup::checkScan(Signal* signal, BackupFilePtr filePtr) sendSignalWithDelay(DBLQH_REF, GSN_SCAN_NEXTREQ, signal, 10000, ScanFragNextReq::SignalLength); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend(); ord->backupId = ptr.p->backupId; @@ -3922,7 +3925,8 @@ Backup::execFSAPPENDREF(Signal* signal) const Uint32 filePtrI = ref->userPointer; const Uint32 errCode = ref->errorCode; - BackupFilePtr filePtr; + + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); filePtr.p->fileRunning = 0; @@ -3942,7 +3946,7 @@ Backup::execFSAPPENDCONF(Signal* signal) const Uint32 filePtrI = signal->theData[0]; //conf->userPointer; const Uint32 bytes = signal->theData[1]; //conf->bytes; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); OperationRecord & op = filePtr.p->operation; @@ -4030,8 +4034,8 @@ Backup::execBACKUP_TRIG_REQ(Signal* signal) /* TUP asks if this trigger is to be fired on this node. */ - TriggerPtr trigPtr; - TablePtr tabPtr; + TriggerPtr trigPtr LINT_SET_PTR; + TablePtr tabPtr LINT_SET_PTR; FragmentPtr fragPtr; Uint32 trigger_id = signal->theData[0]; Uint32 frag_id = signal->theData[1]; @@ -4059,7 +4063,7 @@ Backup::execTRIG_ATTRINFO(Signal* signal) { TrigAttrInfo * trg = (TrigAttrInfo*)signal->getDataPtr(); - TriggerPtr trigPtr; + TriggerPtr trigPtr LINT_SET_PTR; c_triggerPool.getPtr(trigPtr, trg->getTriggerId()); ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID); // Online... @@ -4090,7 +4094,7 @@ Backup::execTRIG_ATTRINFO(Signal* signal) { jam(); Uint32 save[TrigAttrInfo::StaticLength]; memcpy(save, signal->getDataPtr(), 4*TrigAttrInfo::StaticLength); - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, trigPtr.p->backupPtr); trigPtr.p->errorCode = AbortBackupOrd::LogBufferFull; AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend(); @@ -4131,7 +4135,7 @@ Backup::execFIRE_TRIG_ORD(Signal* signal) const Uint32 gci = trg->getGCI(); const Uint32 trI = trg->getTriggerId(); - TriggerPtr trigPtr; + TriggerPtr trigPtr LINT_SET_PTR; c_triggerPool.getPtr(trigPtr, trI); ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID); @@ -4144,7 +4148,7 @@ Backup::execFIRE_TRIG_ORD(Signal* signal) ndbrequire(trigPtr.p->logEntry != 0); Uint32 len = trigPtr.p->logEntry->Length; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, trigPtr.p->backupPtr); if(gci != ptr.p->currGCP) { @@ -4215,7 +4219,7 @@ Backup::execSTOP_BACKUP_REQ(Signal* signal) /** * Get backup record */ - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); ptr.p->slaveState.setState(STOPPING); @@ -4228,6 +4232,7 @@ Backup::execSTOP_BACKUP_REQ(Signal* signal) BackupFilePtr filePtr; ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr); Uint32 * dst; + LINT_INIT(dst); ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, 1)); * dst = 0; filePtr.p->operation.dataBuffer.updateWritePtr(1); @@ -4240,6 +4245,7 @@ Backup::execSTOP_BACKUP_REQ(Signal* signal) const Uint32 gcpSz = sizeof(BackupFormat::CtlFile::GCPEntry) >> 2; Uint32 * dst; + LINT_INIT(dst); ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, gcpSz)); BackupFormat::CtlFile::GCPEntry * gcp = @@ -4331,7 +4337,7 @@ Backup::execFSCLOSEREF(Signal* signal) FsRef * ref = (FsRef*)signal->getDataPtr(); const Uint32 filePtrI = ref->userPointer; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); BackupRecordPtr ptr; @@ -4352,7 +4358,7 @@ Backup::execFSCLOSECONF(Signal* signal) FsConf * conf = (FsConf*)signal->getDataPtr(); const Uint32 filePtrI = conf->userPointer; - BackupFilePtr filePtr; + BackupFilePtr filePtr LINT_SET_PTR; c_backupFilePool.getPtr(filePtr, filePtrI); #ifdef DEBUG_ABORT @@ -4366,7 +4372,7 @@ Backup::execFSCLOSECONF(Signal* signal) filePtr.p->fileOpened = 0; - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, filePtr.p->backupPtr); for(ptr.p->files.first(filePtr); filePtr.i!=RNIL;ptr.p->files.next(filePtr)) { @@ -4432,7 +4438,7 @@ Backup::execABORT_BACKUP_ORD(Signal* signal) dumpUsedResources(); #endif - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; if(requestType == AbortBackupOrd::ClientAbort) { if (getOwnNodeId() != getMasterNodeId()) { jam(); @@ -4561,7 +4567,7 @@ Backup::dumpUsedResources() jam(); for(Uint32 j = 0; j<3; j++) { jam(); - TriggerPtr trigPtr; + TriggerPtr trigPtr LINT_SET_PTR; if(tabPtr.p->triggerAllocated[j]) { jam(); c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]); @@ -4600,7 +4606,7 @@ Backup::cleanup(Signal* signal, BackupRecordPtr ptr) tabPtr.p->fragments.release(); for(Uint32 j = 0; j<3; j++) { jam(); - TriggerPtr trigPtr; + TriggerPtr trigPtr LINT_SET_PTR; if(tabPtr.p->triggerAllocated[j]) { jam(); c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]); @@ -4680,7 +4686,7 @@ Backup::execFSREMOVECONF(Signal* signal){ /** * Get backup record */ - BackupRecordPtr ptr; + BackupRecordPtr ptr LINT_SET_PTR; c_backupPool.getPtr(ptr, ptrI); c_backups.release(ptr); } diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index d2f9150ade0..44f9917438f 100644 --- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -1234,7 +1234,7 @@ Cmvmi::execTESTSIG(Signal* signal){ fprintf(stdout, "\n"); for(i = 0; i<signal->header.m_noOfSections; i++){ - SegmentedSectionPtr ptr; + SegmentedSectionPtr ptr = {0,0,0}; ndbout_c("-- Section %d --", i); signal->getSection(ptr, i); ndbrequire(ptr.p != 0); @@ -1292,7 +1292,7 @@ Cmvmi::execTESTSIG(Signal* signal){ LinearSectionPtr ptr[3]; const Uint32 secs = signal->getNoOfSections(); for(i = 0; i<secs; i++){ - SegmentedSectionPtr sptr; + SegmentedSectionPtr sptr = {0,0,0}; signal->getSection(sptr, i); ptr[i].sz = sptr.sz; ptr[i].p = new Uint32[sptr.sz]; @@ -1341,7 +1341,7 @@ Cmvmi::execTESTSIG(Signal* signal){ LinearSectionPtr ptr[3]; const Uint32 secs = signal->getNoOfSections(); for(i = 0; i<secs; i++){ - SegmentedSectionPtr sptr; + SegmentedSectionPtr sptr = {0,0,0}; signal->getSection(sptr, i); ptr[i].sz = sptr.sz; ptr[i].p = new Uint32[sptr.sz]; @@ -1407,7 +1407,7 @@ Cmvmi::execTESTSIG(Signal* signal){ const Uint32 secs = signal->getNoOfSections(); memset(g_test, 0, sizeof(g_test)); for(i = 0; i<secs; i++){ - SegmentedSectionPtr sptr; + SegmentedSectionPtr sptr = {0,0,0}; signal->getSection(sptr, i); g_test[i].sz = sptr.sz; g_test[i].p = new Uint32[sptr.sz]; diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 7ecdf2466ee..2eca2a76c45 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -10054,8 +10054,8 @@ Dbdict::getDictLockType(Uint32 lockType) static const DictLockType lt[] = { { DictLockReq::NodeRestartLock, BS_NODE_RESTART, "NodeRestart" } }; - for (int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) { - if (lt[i].lockType == lockType) + for (unsigned int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) { + if ((Uint32) lt[i].lockType == lockType) return <[i]; } return NULL; @@ -10207,7 +10207,7 @@ Dbdict::execDICT_UNLOCK_ORD(Signal* signal) DictLockPtr lockPtr; c_dictLockQueue.getPtr(lockPtr, ord->lockPtr); - ndbrequire(lockPtr.p->lt->lockType == ord->lockType); + ndbrequire((Uint32) lockPtr.p->lt->lockType == ord->lockType); if (lockPtr.p->locked) { jam(); diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp index 4b5c0b791f9..da2321bdf6f 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp @@ -132,7 +132,7 @@ Dbtux::searchToAdd(Frag& frag, ConstData searchKey, TreeEnt searchEnt, TreePos& treePos.m_pos = hi; return true; } - if (hi < currNode.getOccup()) { + if ((uint) hi < currNode.getOccup()) { jam(); treePos.m_pos = hi; return true; diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp index 7fa41cb2694..af05eeb9e9a 100644 --- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp +++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp @@ -1524,6 +1524,11 @@ void Ndbcntr::execNODE_FAILREP(Signal* signal) break; } + case StopRecord::SR_BLOCK_GCP_START_GCP: + case StopRecord::SR_WAIT_COMPLETE_GCP: + case StopRecord::SR_UNBLOCK_GCP_START_GCP: + case StopRecord::SR_CLUSTER_SHUTDOWN: + break; } } @@ -2283,7 +2288,7 @@ Ndbcntr::StopRecord::checkNodeFail(Signal* signal){ bool allNodesStopped = true; int i ; - for( i = 0; i< NdbNodeBitmask::Size; i++ ){ + for( i = 0; i < (int) NdbNodeBitmask::Size; i++ ){ if ( stopReq.nodes[i] != 0 ){ allNodesStopped = false; break; diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp index 51d06537dbb..68e649d8ae0 100644 --- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp @@ -160,7 +160,7 @@ void Qmgr::execCONTINUEB(Signal* signal) BaseString tmp; tmp.append("Shutting down node as total restart time exceeds " " StartFailureTimeout as set in config file "); - if(c_restartFailureTimeout == ~0) + if(c_restartFailureTimeout == (Uint32) ~0) tmp.append(" 0 (inifinite)"); else tmp.appfmt(" %d", c_restartFailureTimeout); @@ -1339,7 +1339,7 @@ Qmgr::check_startup(Signal* signal) if (now < partial_timeout) { jam(); - signal->theData[1] = c_restartPartialTimeout == ~0 ? 2 : 3; + signal->theData[1] = c_restartPartialTimeout == (Uint32) ~0 ? 2 : 3; signal->theData[2] = Uint32((partial_timeout - now + 500) / 1000); report_mask.assign(wait); retVal = 0; @@ -1356,7 +1356,7 @@ Qmgr::check_startup(Signal* signal) case CheckNodeGroups::Partitioning: if (now < partitioned_timeout && result != CheckNodeGroups::Win) { - signal->theData[1] = c_restartPartionedTimeout == ~0 ? 4 : 5; + signal->theData[1] = c_restartPartionedTimeout == (Uint32) ~0 ? 4 : 5; signal->theData[2] = Uint32((partitioned_timeout - now + 500) / 1000); report_mask.assign(c_definedNodes); report_mask.bitANDC(c_start.m_starting_nodes); @@ -1403,6 +1403,7 @@ missing_nodegroup: " starting: %s (missing fs for: %s)", mask1, mask2); progError(__LINE__, NDBD_EXIT_SR_RESTARTCONFLICT, buf); + return 0; // Deadcode } void diff --git a/ndb/src/kernel/error/ErrorReporter.cpp b/ndb/src/kernel/error/ErrorReporter.cpp index 6c8bb1fe615..e95cd5c132f 100644 --- a/ndb/src/kernel/error/ErrorReporter.cpp +++ b/ndb/src/kernel/error/ErrorReporter.cpp @@ -185,6 +185,7 @@ ErrorReporter::handleAssert(const char* message, const char* file, int line, int childReportError(ec); NdbShutdown(s_errorHandlerShutdownType); + exit(1); // Deadcode } void diff --git a/ndb/src/kernel/error/ErrorReporter.hpp b/ndb/src/kernel/error/ErrorReporter.hpp index 0ec84190238..dffec14dff2 100644 --- a/ndb/src/kernel/error/ErrorReporter.hpp +++ b/ndb/src/kernel/error/ErrorReporter.hpp @@ -29,7 +29,7 @@ public: static void setErrorHandlerShutdownType(NdbShutdownType nst = NST_ErrorHandler); static void handleAssert(const char* message, const char* file, - int line, int ec = NDBD_EXIT_PRGERR); + int line, int ec = NDBD_EXIT_PRGERR) __attribute__((__noreturn__)); static void handleError(int faultID, const char* problemData, diff --git a/ndb/src/kernel/error/ndbd_exit_codes.c b/ndb/src/kernel/error/ndbd_exit_codes.c index 1853130f93c..205af85575a 100644 --- a/ndb/src/kernel/error/ndbd_exit_codes.c +++ b/ndb/src/kernel/error/ndbd_exit_codes.c @@ -14,6 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <ndbd_exit_codes.h> typedef struct ErrStruct { diff --git a/ndb/src/kernel/vm/TransporterCallback.cpp b/ndb/src/kernel/vm/TransporterCallback.cpp index f315918b871..badd2af669c 100644 --- a/ndb/src/kernel/vm/TransporterCallback.cpp +++ b/ndb/src/kernel/vm/TransporterCallback.cpp @@ -56,7 +56,7 @@ const char *lookupConnectionError(Uint32 err) { int i= 0; while ((Uint32)connectionError[i].err != err && - (Uint32)connectionError[i].err != -1) + connectionError[i].err != -1) i++; return connectionError[i].text; } diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp index cab06331bbc..df69684784a 100644 --- a/ndb/src/mgmapi/mgmapi.cpp +++ b/ndb/src/mgmapi/mgmapi.cpp @@ -2565,8 +2565,8 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length) args.put("length", length); BaseString data_string; - for (int i = 0; i < length; i++) - data_string.appfmt(" %u", data[i]); + for (int i = 0; i < (int) length; i++) + data_string.appfmt(" %lu", (ulong) data[i]); args.put("data", data_string.c_str()); diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 2d096b10411..1dacd9689e8 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -653,7 +653,7 @@ static const char* helpTextDebug = ; #endif -struct { +struct st_cmd_help { const char *cmd; const char * help; }help_items[]={ @@ -2466,7 +2466,7 @@ CommandInterpreter::executeEventReporting(int processId, Vector<BaseString> specs; tmp.split(specs, " "); - for (int i=0; i < specs.size(); i++) + for (int i=0; i < (int) specs.size(); i++) { Vector<BaseString> spec; specs[i].split(spec, "="); diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index a2329c67bb7..766992af0cb 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -835,7 +835,7 @@ MgmtSrvr::sendVersionReq(int v_nodeId, Uint32 &version, const char **address) case GSN_API_VERSION_CONF: { const ApiVersionConf * const conf = CAST_CONSTPTR(ApiVersionConf, signal->getDataPtr()); - assert(conf->nodeId == v_nodeId); + assert((int) conf->nodeId == v_nodeId); version = conf->version; struct in_addr in; in.s_addr= conf->inet_addr; @@ -1573,7 +1573,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId, NodeBitmask nodes; nodes.clear(); Uint32 max = (nodeId == 0) ? (nodeId = 1, MAX_NDB_NODES) : nodeId; - for(; nodeId <= max; nodeId++) + for(; (Uint32) nodeId <= max; nodeId++) { if (nodeTypes[nodeId] != NODE_TYPE_DB) continue; @@ -2001,8 +2001,8 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId, int log_event) { DBUG_ENTER("MgmtSrvr::alloc_node_id"); - DBUG_PRINT("enter", ("nodeid=%d, type=%d, client_addr=%d", - *nodeId, type, client_addr)); + DBUG_PRINT("enter", ("nodeid: %d type: %d client_addr: 0x%ld", + *nodeId, type, (long) client_addr)); if (g_no_nodeid_checks) { if (*nodeId == 0) { error_string.appfmt("no-nodeid-checks set in management server.\n" diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp index 7d59a303df2..bf16aa03d04 100644 --- a/ndb/src/mgmsrv/Services.cpp +++ b/ndb/src/mgmsrv/Services.cpp @@ -1699,7 +1699,7 @@ MgmApiSession::report_event(Parser_t::Context &ctx, BaseString tmp(data_string); Vector<BaseString> item; tmp.split(item, " "); - for (int i = 0; i < length ; i++) + for (int i = 0; (Uint32) i < length ; i++) { sscanf(item[i].c_str(), "%u", data+i); } diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp index 475561af225..8545c599341 100644 --- a/ndb/src/ndbapi/ClusterMgr.cpp +++ b/ndb/src/ndbapi/ClusterMgr.cpp @@ -213,7 +213,7 @@ ClusterMgr::forceHB() int nodeId= 0; for(int i=0; - NodeBitmask::NotFound!=(nodeId= waitForHBFromNodes.find(i)); + (int) NodeBitmask::NotFound != (nodeId= waitForHBFromNodes.find(i)); i= nodeId+1) { #ifdef DEBUG_REG diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index bb59c16fb7c..ba8b0799398 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -116,7 +116,8 @@ void GlobalDictCache::printCache() NdbElement_t<Vector<TableVersion> > * curr = m_tableHash.getNext(0); while(curr != 0){ DBUG_PRINT("curr", ("len: %d, hash: %d, lk: %d, str: %s", - curr->len, curr->hash, curr->localkey1, curr->str)); + curr->len, curr->hash, curr->localkey1, + (char*) curr->str)); if (curr->theData){ Vector<TableVersion> * vers = curr->theData; const unsigned sz = vers->size(); diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 9d1c78a5972..c701fbf77e0 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -355,8 +355,9 @@ Ndb::startTransaction(const NdbDictionary::Table *table, { NdbTransaction *trans= startTransactionLocal(0, nodeId); - DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx", - trans, trans ? trans->getTransactionId() : 0)); + DBUG_PRINT("exit",("start trans: 0x%lx transid: 0x%lx", + (long) trans, + (long) (trans ? trans->getTransactionId() : 0))); DBUG_RETURN(trans); } } else { @@ -377,7 +378,7 @@ Ndb::hupp(NdbTransaction* pBuddyTrans) { DBUG_ENTER("Ndb::hupp"); - DBUG_PRINT("enter", ("trans: 0x%x",pBuddyTrans)); + DBUG_PRINT("enter", ("trans: 0x%lx", (long) pBuddyTrans)); Uint32 aPriority = 0; if (pBuddyTrans == NULL){ @@ -402,8 +403,9 @@ Ndb::hupp(NdbTransaction* pBuddyTrans) } pCon->setTransactionId(pBuddyTrans->getTransactionId()); pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr()); - DBUG_PRINT("exit", ("hupp trans: 0x%x transid: 0x%llx", - pCon, pCon ? pCon->getTransactionId() : 0)); + DBUG_PRINT("exit", ("hupp trans: 0x%lx transid: 0x%lx", + (long) pCon, + (long) (pCon ? pCon->getTransactionId() : 0))); DBUG_RETURN(pCon); } else { DBUG_RETURN(NULL); @@ -490,8 +492,9 @@ Ndb::closeTransaction(NdbTransaction* aConnection) tCon = theTransactionList; theRemainingStartTransactions++; - DBUG_PRINT("info",("close trans: 0x%x transid: 0x%llx", - aConnection, aConnection->getTransactionId())); + DBUG_PRINT("info",("close trans: 0x%lx transid: 0x%lx", + (long) aConnection, + (long) aConnection->getTransactionId())); DBUG_PRINT("info",("magic number: 0x%x TCConPtr: 0x%x theMyRef: 0x%x 0x%x", aConnection->theMagicNumber, aConnection->theTCConPtr, aConnection->theMyRef, getReference())); diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp index 835e33dfb40..42dec161307 100644 --- a/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -407,10 +407,10 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, const char* aValuePassed, Uint32 len) { DBUG_ENTER("NdbOperation::setValue"); - DBUG_PRINT("enter", ("col=%s op=%d val=0x%x len=%u", + DBUG_PRINT("enter", ("col: %s op: %d val: 0x%lx len: %u", tAttrInfo->m_name.c_str(), theOperationType, - aValuePassed, len)); + (long) aValuePassed, len)); if (aValuePassed != NULL) DBUG_DUMP("value", (char*)aValuePassed, len); diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp index 58a816e3c1a..11713678478 100644 --- a/ndb/src/ndbapi/NdbOperationExec.cpp +++ b/ndb/src/ndbapi/NdbOperationExec.cpp @@ -205,7 +205,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen); // A simple read is always ignore error - abortOption = tSimpleIndicator ? AO_IgnoreError : abortOption; + abortOption = tSimpleIndicator ? (Uint8) AO_IgnoreError : abortOption; tcKeyReq->setAbortOption(tReqInfo, abortOption); Uint8 tDistrKeyIndicator = theDistrKeyIndicator_; diff --git a/ndb/src/ndbapi/NdbOperationInt.cpp b/ndb/src/ndbapi/NdbOperationInt.cpp index 41e0cb1d140..6defb37467f 100644 --- a/ndb/src/ndbapi/NdbOperationInt.cpp +++ b/ndb/src/ndbapi/NdbOperationInt.cpp @@ -1015,8 +1015,8 @@ NdbOperation::branch_col(Uint32 type, bool nopad, Uint32 Label){ DBUG_ENTER("NdbOperation::branch_col"); - DBUG_PRINT("enter", ("type=%u col=%u val=0x%x len=%u label=%u", - type, ColId, val, len, Label)); + DBUG_PRINT("enter", ("type: %u col:%u val: 0x%lx len: %u label: %u", + type, ColId, (long) val, len, Label)); if (val != NULL) DBUG_DUMP("value", (char*)val, len); diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp index 4be7ccb313c..ede3240e9f4 100644 --- a/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -58,10 +58,10 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, Uint32 aVariableKeyLen) { DBUG_ENTER("NdbOperation::equal_impl"); - DBUG_PRINT("enter", ("col=%s op=%d val=0x%x len=%u", + DBUG_PRINT("enter", ("col: %s op: %d val: 0x%lx len: %u", tAttrInfo->m_name.c_str(), theOperationType, - aValuePassed, aVariableKeyLen)); + (long) aValuePassed, aVariableKeyLen)); if (aValuePassed != NULL) DBUG_DUMP("value", (char*)aValuePassed, aVariableKeyLen); diff --git a/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp index 28bb9aeba55..86dc92a86c1 100644 --- a/ndb/src/ndbapi/NdbTransaction.cpp +++ b/ndb/src/ndbapi/NdbTransaction.cpp @@ -530,8 +530,8 @@ NdbTransaction::executeAsynchPrepare( ExecType aTypeOfExec, AbortOption abortOption) { DBUG_ENTER("NdbTransaction::executeAsynchPrepare"); - DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: %x, anyObject: %x", - aTypeOfExec, aCallback, anyObject)); + DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: 0x%lx, anyObject: Ox%lx", + aTypeOfExec, (long) aCallback, (long) anyObject)); /** * Reset error.code on execute diff --git a/ndb/src/ndbapi/Ndbif.cpp b/ndb/src/ndbapi/Ndbif.cpp index 6aaf44d0168..3ab9446e011 100644 --- a/ndb/src/ndbapi/Ndbif.cpp +++ b/ndb/src/ndbapi/Ndbif.cpp @@ -193,11 +193,11 @@ void Ndb::connected(Uint32 ref) ((Uint64)tmpTheNode << 40); theFirstTransId += theFacade->m_max_trans_id; // assert(0); - DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%lx", + DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id: 0x%lx", theMyRef, tmpTheNode, theImpl->theNoOfDBnodes, - theFirstTransId)); + (long) theFirstTransId)); theCommitAckSignal = new NdbApiSignal(theMyRef); theDictionary->m_receiver.m_reference= theMyRef; diff --git a/ndb/src/ndbapi/Ndbinit.cpp b/ndb/src/ndbapi/Ndbinit.cpp index 40cac675b21..fbabe9e6dc6 100644 --- a/ndb/src/ndbapi/Ndbinit.cpp +++ b/ndb/src/ndbapi/Ndbinit.cpp @@ -39,7 +39,7 @@ Ndb::Ndb( Ndb_cluster_connection *ndb_cluster_connection, : theImpl(NULL) { DBUG_ENTER("Ndb::Ndb()"); - DBUG_PRINT("enter",("Ndb::Ndb this=0x%x", this)); + DBUG_PRINT("enter",("Ndb::Ndb this: 0x%lx", (long) this)); setup(ndb_cluster_connection, aDataBase, aSchema); DBUG_VOID_RETURN; } @@ -115,7 +115,7 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection, Ndb::~Ndb() { DBUG_ENTER("Ndb::~Ndb()"); - DBUG_PRINT("enter",("Ndb::~Ndb this=0x%x",this)); + DBUG_PRINT("enter",("Ndb::~Ndb this: 0x%lx",(long) this)); doDisconnect(); if (TransporterFacade::instance() != NULL && theNdbBlockNumber > 0){ diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp index 1e53558f179..3ae84125112 100644 --- a/ndb/src/ndbapi/ndb_cluster_connection.cpp +++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp @@ -262,7 +262,7 @@ Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char * m_name(0) { DBUG_ENTER("Ndb_cluster_connection"); - DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%x", this)); + DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this)); g_eventLogger.createConsoleHandler(); g_eventLogger.setCategory("NdbApi"); diff --git a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp index aa207212dbe..c10211a9108 100644 --- a/ndb/tools/drop_index.cpp +++ b/ndb/tools/drop_index.cpp @@ -51,9 +51,6 @@ int main(int argc, char** argv){ NDB_INIT(argv[0]); load_defaults("my",load_default_groups,&argc,&argv); int ho_error; -#ifndef DBUG_OFF - "d:t:O,/tmp/ndb_drop_index.trace"; -#endif if ((ho_error=handle_options(&argc, &argv, my_long_options, ndb_std_get_one_option))) return NDBT_ProgramExit(NDBT_WRONGARGS); diff --git a/ndb/tools/drop_tab.cpp b/ndb/tools/drop_tab.cpp index d14c60a2c6d..61df4ee9b34 100644 --- a/ndb/tools/drop_tab.cpp +++ b/ndb/tools/drop_tab.cpp @@ -51,9 +51,6 @@ int main(int argc, char** argv){ NDB_INIT(argv[0]); load_defaults("my",load_default_groups,&argc,&argv); int ho_error; -#ifndef DBUG_OFF - "d:t:O,/tmp/ndb_drop_table.trace"; -#endif if ((ho_error=handle_options(&argc, &argv, my_long_options, ndb_std_get_one_option))) return NDBT_ProgramExit(NDBT_WRONGARGS); diff --git a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp index 8b862391c8e..049e4599447 100644 --- a/ndb/tools/ndb_config.cpp +++ b/ndb/tools/ndb_config.cpp @@ -114,6 +114,7 @@ struct Match int m_key; BaseString m_value; virtual int eval(const Iter&); + virtual ~Match() {} }; struct HostMatch : public Match @@ -127,6 +128,7 @@ struct Apply Apply(int val) { m_key = val;} int m_key; virtual int apply(const Iter&); + virtual ~Apply() {} }; struct NodeTypeApply : public Apply |