summaryrefslogtreecommitdiff
path: root/storage/ndb
diff options
context:
space:
mode:
Diffstat (limited to 'storage/ndb')
-rw-r--r--storage/ndb/include/ndb_global.h.in1
-rw-r--r--storage/ndb/include/util/NdbOut.hpp2
-rw-r--r--storage/ndb/include/util/SimpleProperties.hpp5
-rw-r--r--storage/ndb/src/kernel/blocks/backup/Backup.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp8
-rw-r--r--storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp18
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp14
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp1
-rw-r--r--storage/ndb/src/kernel/blocks/lgman.cpp4
-rw-r--r--storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp4
-rw-r--r--storage/ndb/src/kernel/blocks/pgman.cpp4
-rw-r--r--storage/ndb/src/kernel/blocks/restore.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/suma/Suma.cpp5
-rw-r--r--storage/ndb/src/kernel/vm/Configuration.cpp2
-rw-r--r--storage/ndb/src/kernel/vm/DLHashTable.hpp1
-rw-r--r--storage/ndb/src/kernel/vm/RWPool.hpp1
-rw-r--r--storage/ndb/src/kernel/vm/SimulatedBlock.cpp1
-rw-r--r--storage/ndb/src/kernel/vm/WOPool.hpp1
-rw-r--r--storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp4
-rw-r--r--storage/ndb/src/mgmclient/CommandInterpreter.cpp2
-rw-r--r--storage/ndb/src/mgmsrv/MgmtSrvr.cpp4
-rw-r--r--storage/ndb/src/ndbapi/DictCache.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp10
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp33
-rw-r--r--storage/ndb/src/ndbapi/NdbIndexOperation.cpp3
-rw-r--r--storage/ndb/src/ndbapi/NdbIndexStat.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationInt.cpp24
-rw-r--r--storage/ndb/src/ndbapi/NdbRecAttr.cpp7
-rw-r--r--storage/ndb/src/ndbapi/NdbScanOperation.cpp5
-rw-r--r--storage/ndb/src/ndbapi/ObjectMap.hpp10
-rw-r--r--storage/ndb/tools/desc.cpp12
-rw-r--r--storage/ndb/tools/restore/Restore.cpp6
-rw-r--r--storage/ndb/tools/restore/consumer_restore.cpp6
39 files changed, 137 insertions, 89 deletions
diff --git a/storage/ndb/include/ndb_global.h.in b/storage/ndb/include/ndb_global.h.in
index 0befd0ab026..24e75f964a0 100644
--- a/storage/ndb/include/ndb_global.h.in
+++ b/storage/ndb/include/ndb_global.h.in
@@ -137,6 +137,7 @@ extern "C" {
#define LINT_SET_PTR = {0,0}
#else
#define LINT_SET_PTR
+#endif
#ifndef MIN
#define MIN(x,y) (((x)<(y))?(x):(y))
diff --git a/storage/ndb/include/util/NdbOut.hpp b/storage/ndb/include/util/NdbOut.hpp
index d85d5cc6305..911777be07d 100644
--- a/storage/ndb/include/util/NdbOut.hpp
+++ b/storage/ndb/include/util/NdbOut.hpp
@@ -106,7 +106,7 @@ inline NdbOut& dec(NdbOut& _NdbOut) {
return _NdbOut.setHexFormat(0);
}
extern "C"
-void ndbout_c(const char * fmt, ...);
+void ndbout_c(const char * fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
class FilteredNdbOut : public NdbOut {
public:
diff --git a/storage/ndb/include/util/SimpleProperties.hpp b/storage/ndb/include/util/SimpleProperties.hpp
index 60aeca1ed50..f199790f416 100644
--- a/storage/ndb/include/util/SimpleProperties.hpp
+++ b/storage/ndb/include/util/SimpleProperties.hpp
@@ -153,7 +153,6 @@ public:
ValueType m_type;
protected:
Reader();
- virtual ~Reader() {}
virtual void reset() = 0;
virtual bool step(Uint32 len) = 0;
@@ -168,7 +167,6 @@ public:
class Writer {
public:
Writer() {}
- virtual ~Writer() {}
bool first();
bool add(Uint16 key, Uint32 value);
@@ -192,7 +190,6 @@ public:
SimplePropertiesLinearReader(const Uint32 * src, Uint32 len);
virtual ~SimplePropertiesLinearReader() {}
- virtual ~SimplePropertiesLinearReader() {}
virtual void reset();
virtual bool step(Uint32 len);
virtual bool getWord(Uint32 * dst);
@@ -230,7 +227,6 @@ public:
UtilBufferWriter(class UtilBuffer & buf);
virtual ~UtilBufferWriter() {}
- virtual ~UtilBufferWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
@@ -284,7 +280,6 @@ public:
SimplePropertiesSectionWriter(class SectionSegmentPool &);
virtual ~SimplePropertiesSectionWriter() {}
- virtual ~SimplePropertiesSectionWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
index 8081db7e18c..819255a79f5 100644
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -2118,7 +2118,7 @@ Backup::execDROP_TRIG_REF(Signal* signal)
BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
- if(ref->getConf()->getTriggerId() != -1)
+ if(ref->getConf()->getTriggerId() != ~(Uint32) 0)
{
ndbout << "ERROR DROPPING TRIGGER: " << ref->getConf()->getTriggerId();
ndbout << " Err: " << (Uint32)ref->getErrorCode() << endl << endl;
diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index b36eaab4d46..957248bcf56 100644
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -1287,7 +1287,7 @@ Cmvmi::execTESTSIG(Signal* signal){
fprintf(stdout, "\n");
for(i = 0; i<signal->header.m_noOfSections; i++){
- SegmentedSectionPtr ptr = {0,0,0};
+ SegmentedSectionPtr ptr;
ndbout_c("-- Section %d --", i);
signal->getSection(ptr, i);
ndbrequire(ptr.p != 0);
@@ -1345,7 +1345,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1394,7 +1394,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1460,7 +1460,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 = {0,0,0};
+ SegmentedSectionPtr sptr;
signal->getSection(sptr, i);
g_test[i].sz = sptr.sz;
g_test[i].p = new Uint32[sptr.sz];
diff --git a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index d5578a5c0c0..8a994db4fbc 100644
--- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -971,10 +971,10 @@ void Dbacc::initOpRec(Signal* signal)
Uint32 opbits = 0;
opbits |= Treqinfo & 0x7;
- opbits |= ((Treqinfo >> 4) & 0x3) ? Operationrec::OP_LOCK_MODE : 0;
- opbits |= ((Treqinfo >> 4) & 0x3) ? Operationrec::OP_ACC_LOCK_MODE : 0;
- opbits |= (dirtyReadFlag) ? Operationrec::OP_DIRTY_READ : 0;
- opbits |= ((Treqinfo >> 31) & 0x1) ? Operationrec::OP_LOCK_REQ : 0;
+ opbits |= ((Treqinfo >> 4) & 0x3) ? (Uint32) Operationrec::OP_LOCK_MODE : 0;
+ opbits |= ((Treqinfo >> 4) & 0x3) ? (Uint32) Operationrec::OP_ACC_LOCK_MODE : 0;
+ opbits |= (dirtyReadFlag) ? (Uint32) Operationrec::OP_DIRTY_READ : 0;
+ opbits |= ((Treqinfo >> 31) & 0x1) ? (Uint32) Operationrec::OP_LOCK_REQ : 0;
//operationRecPtr.p->nodeType = (Treqinfo >> 7) & 0x3;
operationRecPtr.p->fid = fragrecptr.p->myfid;
@@ -6947,10 +6947,10 @@ void Dbacc::initScanOpRec(Signal* signal)
Uint32 opbits = 0;
opbits |= ZSCAN_OP;
- opbits |= scanPtr.p->scanLockMode ? Operationrec::OP_LOCK_MODE : 0;
- opbits |= scanPtr.p->scanLockMode ? Operationrec::OP_ACC_LOCK_MODE : 0;
- opbits |= scanPtr.p->scanReadCommittedFlag ?
- Operationrec::OP_EXECUTED_DIRTY_READ : 0;
+ opbits |= scanPtr.p->scanLockMode ? (Uint32) Operationrec::OP_LOCK_MODE : 0;
+ opbits |= scanPtr.p->scanLockMode ? (Uint32) Operationrec::OP_ACC_LOCK_MODE : 0;
+ opbits |= (scanPtr.p->scanReadCommittedFlag ?
+ (Uint32) Operationrec::OP_EXECUTED_DIRTY_READ : 0);
opbits |= Operationrec::OP_COMMIT_DELETE_CHECK;
operationRecPtr.p->userptr = RNIL;
operationRecPtr.p->scanRecPtr = scanPtr.i;
@@ -7700,6 +7700,7 @@ void Dbacc::putOverflowRecInFrag(Signal* signal)
OverflowRecordPtr tpifPrevOverrecPtr;
tpifNextOverrecPtr.i = fragrecptr.p->firstOverflowRec;
+ LINT_INIT(tpifPrevOverrecPtr.p);
tpifPrevOverrecPtr.i = RNIL;
while (tpifNextOverrecPtr.i != RNIL) {
ptrCheckGuard(tpifNextOverrecPtr, coverflowrecsize, overflowRecord);
@@ -7749,6 +7750,7 @@ void Dbacc::putRecInFreeOverdir(Signal* signal)
OverflowRecordPtr tpfoPrevOverrecPtr;
tpfoNextOverrecPtr.i = fragrecptr.p->firstFreeDirindexRec;
+ LINT_INIT(tpfoPrevOverrecPtr.p);
tpfoPrevOverrecPtr.i = RNIL;
while (tpfoNextOverrecPtr.i != RNIL) {
ptrCheckGuard(tpfoNextOverrecPtr, coverflowrecsize, overflowRecord);
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index b91131ca32d..1c305d74863 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -189,7 +189,7 @@ struct {
&Dbdict::drop_undofile_prepare_start, 0,
0,
0, 0,
- 0, 0
+ 0, 0, 0
}
};
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index 0e9157c38aa..1eee1badce3 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -2909,7 +2909,7 @@ Dbdih::nr_start_fragment(Signal* signal,
}
}
- if (maxLcpIndex == ~0)
+ if (maxLcpIndex == ~ (Uint32) 0)
{
ndbout_c("Didnt find any LCP for node: %d tab: %d frag: %d",
takeOverPtr.p->toStartingNode,
@@ -5968,6 +5968,7 @@ Dbdih::sendMASTER_LCPCONF(Signal * signal){
break;
default:
ndbrequire(false);
+ lcpState= MasterLCPConf::LCP_STATUS_IDLE; // remove warning
}//switch
Uint32 failedNodeId = c_lcpState.m_MASTER_LCPREQ_FailedNodeId;
@@ -6892,6 +6893,8 @@ void Dbdih::execDIADDTABREQ(Signal* signal)
Uint32 align;
};
SegmentedSectionPtr fragDataPtr;
+ LINT_INIT(fragDataPtr.i);
+ LINT_INIT(fragDataPtr.sz);
signal->getSection(fragDataPtr, DiAddTabReq::FRAGMENTATION);
copy((Uint32*)fragments, fragDataPtr);
releaseSections(signal);
@@ -6981,7 +6984,9 @@ Dbdih::sendAddFragreq(Signal* signal, ConnectRecordPtr connectPtr,
TabRecordPtr tabPtr, Uint32 fragId){
jam();
const Uint32 fragCount = tabPtr.p->totalfragments;
- ReplicaRecordPtr replicaPtr; replicaPtr.i = RNIL;
+ ReplicaRecordPtr replicaPtr;
+ LINT_INIT(replicaPtr.p);
+ replicaPtr.i = RNIL;
FragmentstorePtr fragPtr;
for(; fragId<fragCount; fragId++){
jam();
@@ -7541,7 +7546,11 @@ void Dbdih::execDI_FCOUNTREQ(Signal* signal)
if(connectPtr.i == RNIL)
ref->m_connectionData = RNIL;
else
+ {
+ jam();
+ ptrCheckGuard(connectPtr, cconnectFileSize, connectRecord);
ref->m_connectionData = connectPtr.p->userpointer;
+ }
ref->m_tableRef = tabPtr.i;
ref->m_senderData = senderData;
ref->m_error = DihFragCountRef::ErroneousTableState;
@@ -11443,6 +11452,7 @@ Dbdih::findBestLogNode(CreateReplicaRecord* createReplica,
{
ConstPtr<ReplicaRecord> fblFoundReplicaPtr;
ConstPtr<ReplicaRecord> fblReplicaPtr;
+ LINT_INIT(fblFoundReplicaPtr.p);
/* --------------------------------------------------------------------- */
/* WE START WITH ZERO AS FOUND TO ENSURE THAT FIRST HIT WILL BE */
diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 9a7803efbec..53d7d98ae84 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -3417,9 +3417,9 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
}
else
{
- regTcPtr->operation = op == ZREAD_EX ? ZREAD : op;
+ regTcPtr->operation = (Operation_t) op == ZREAD_EX ? ZREAD : (Operation_t) op;
regTcPtr->lockType =
- op == ZREAD_EX ? ZUPDATE : op == ZWRITE ? ZINSERT : op;
+ op == ZREAD_EX ? ZUPDATE : (Operation_t) op == ZWRITE ? ZINSERT : (Operation_t) op;
}
CRASH_INSERTION2(5041, regTcPtr->simpleRead &&
@@ -18520,7 +18520,7 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
do
{
ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord);
- ndbout_c(" file %d(%d) FileChangeState: %d logFileStatus: %d currentMbyte: %d currentFilepage",
+ ndbout_c(" file %d(%d) FileChangeState: %d logFileStatus: %d currentMbyte: %d currentFilepage %d",
logFilePtr.p->fileNo,
logFilePtr.i,
logFilePtr.p->fileChangeState,
diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 3fdd587afa5..af2925fa738 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -3194,7 +3194,7 @@ void Dbtc::sendlqhkeyreq(Signal* signal,
if (unlikely(version < NDBD_ROWID_VERSION))
{
Uint32 op = regTcPtr->operation;
- Uint32 lock = op == ZREAD_EX ? ZUPDATE : op == ZWRITE ? ZINSERT : op;
+ Uint32 lock = (Operation_t) op == ZREAD_EX ? ZUPDATE : (Operation_t) op == ZWRITE ? ZINSERT : (Operation_t) op;
LqhKeyReq::setLockType(Tdata10, lock);
}
/* ---------------------------------------------------------------------- */
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
index fc3419e694a..23edd212991 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
@@ -43,7 +43,7 @@ void Dbtup::execTUP_DEALLOCREQ(Signal* signal)
getFragmentrec(regFragPtr, frag_id, regTabPtr.p);
ndbassert(regFragPtr.p != NULL);
- if (! (((frag_page_id << MAX_TUPLES_BITS) + page_index) == ~0))
+ if (! (((frag_page_id << MAX_TUPLES_BITS) + page_index) == ~ (Uint32) 0))
{
Local_key tmp;
tmp.m_page_no= getRealpid(regFragPtr.p, frag_page_id);
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
index a055b18888b..7959606b7f4 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
@@ -82,7 +82,7 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc_info & alloc)
{
ndbout << ptr << " ";
}
- ndbout_c("");
+ ndbout_c(" ");
}
ndbout_c("page requests");
for(Uint32 i = 0; i<MAX_FREE_LIST; i++)
@@ -95,7 +95,7 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc_info & alloc)
{
ndbout << ptr << " ";
}
- ndbout_c("");
+ ndbout_c(" ");
}
ndbout_c("Extent matrix");
@@ -108,7 +108,7 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc_info & alloc)
{
ndbout << ptr << " ";
}
- ndbout_c("");
+ ndbout_c(" ");
}
if (alloc.m_curr_extent_info_ptr_i != RNIL)
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index d9710cc2549..d24483b8f1d 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -684,7 +684,7 @@ void Dbtup::execTUPKEYREQ(Signal* signal)
copyAttrinfo(regOperPtr, &cinBuffer[0]);
Uint32 localkey = (pageid << MAX_TUPLES_BITS) + pageidx;
- if(Roptype == ZINSERT && localkey == ~0)
+ if (Roptype == ZINSERT && localkey == ~ (Uint32) 0)
{
// No tuple allocatated yet
goto do_insert;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
index 1ec7994dce7..1333e7be2de 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
@@ -284,4 +284,5 @@ Dbtup::alloc_fix_rowid(Fragrecord* regFragPtr,
case ZEMPTY_MM:
ndbrequire(false);
}
+ return 0; /* purify: deadcode */
}
diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp
index d4cc0cb89e8..dff41ab8bca 100644
--- a/storage/ndb/src/kernel/blocks/lgman.cpp
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp
@@ -1809,11 +1809,11 @@ Lgman::execLCP_FRAG_ORD(Signal* signal)
if(0)
ndbout_c
- ("execLCP_FRAG_ORD (%d %d) (%d %d) (%d %d) free pages: %d",
+ ("execLCP_FRAG_ORD (%d %d) (%d %d) (%d %d) free pages: %ld",
ptr.p->m_tail_pos[0].m_ptr_i, ptr.p->m_tail_pos[0].m_idx,
ptr.p->m_tail_pos[1].m_ptr_i, ptr.p->m_tail_pos[1].m_idx,
ptr.p->m_tail_pos[2].m_ptr_i, ptr.p->m_tail_pos[2].m_idx,
- (ptr.p->m_free_file_words / File_formats::UNDO_PAGE_WORDS));
+ (long) (ptr.p->m_free_file_words / File_formats::UNDO_PAGE_WORDS));
}
m_logfile_group_list.next(ptr);
}
diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
index 362a462b081..b20f810d029 100644
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
@@ -655,7 +655,7 @@ Ndbfs::createAsyncFile(){
// Print info about all open files
for (unsigned i = 0; i < theFiles.size(); i++){
AsyncFile* file = theFiles[i];
- ndbout_c("%2d (0x%x): %s", i, file, file->isOpen()?"OPEN":"CLOSED");
+ ndbout_c("%2d (0x%lx): %s", i, (long) file, file->isOpen()?"OPEN":"CLOSED");
}
ERROR_SET(fatal, NDBD_EXIT_AFS_MAXOPEN,""," Ndbfs::createAsyncFile");
}
@@ -1130,7 +1130,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal)
ndbout << "All files: " << endl;
for (unsigned i = 0; i < theFiles.size(); i++){
AsyncFile* file = theFiles[i];
- ndbout_c("%2d (0x%x): %s", i,file, file->isOpen()?"OPEN":"CLOSED");
+ ndbout_c("%2d (0x%lx): %s", i, (long) file, file->isOpen()?"OPEN":"CLOSED");
}
}
}//Ndbfs::execDUMP_STATE_ORD()
diff --git a/storage/ndb/src/kernel/blocks/pgman.cpp b/storage/ndb/src/kernel/blocks/pgman.cpp
index 15f056f70a9..88ea0122268 100644
--- a/storage/ndb/src/kernel/blocks/pgman.cpp
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp
@@ -1188,7 +1188,7 @@ Pgman::process_lcp(Signal* signal)
pl_hash.next(m_lcp_curr_bucket, iter);
Uint32 loop = 0;
while (iter.curr.i != RNIL &&
- m_lcp_outstanding < max_count &&
+ m_lcp_outstanding < (Uint32) max_count &&
(loop ++ < 32 || iter.bucket == m_lcp_curr_bucket))
{
Ptr<Page_entry>& ptr = iter.curr;
@@ -2324,7 +2324,7 @@ Pgman::execDUMP_STATE_ORD(Signal* signal)
if (signal->theData[0] == 11004)
{
- ndbout << "Dump LCP bucket m_lcp_outstanding: %d", m_lcp_outstanding;
+ ndbout << "Dump LCP bucket m_lcp_outstanding: " << m_lcp_outstanding;
if (m_lcp_curr_bucket != ~(Uint32)0)
{
Page_hashlist::Iterator iter;
diff --git a/storage/ndb/src/kernel/blocks/restore.cpp b/storage/ndb/src/kernel/blocks/restore.cpp
index b80bc88ec5b..0436347eeca 100644
--- a/storage/ndb/src/kernel/blocks/restore.cpp
+++ b/storage/ndb/src/kernel/blocks/restore.cpp
@@ -1137,7 +1137,7 @@ Restore::reorder_key(const KeyDescriptor* desc,
}
dst += sz;
}
- ndbassert((dst - Tmp) == len);
+ ndbassert((Uint32) (dst - Tmp) == len);
memcpy(data, Tmp, 4*len);
}
diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
index 4b38ac0f5ff..92efca36a35 100644
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -1590,6 +1590,9 @@ Suma::execGET_TABINFOREF(Signal* signal){
break;
case GetTabInfoRef::TableNameTooLong:
ndbrequire(false);
+ break;
+ case GetTabInfoRef::NoFetchByName:
+ break;
}
if (do_resend_request)
{
@@ -4306,7 +4309,7 @@ Suma::Restart::sendSubStartReq(SubscriptionPtr subPtr, SubscriberPtr subbPtr,
// restarting suma will not respond to this until startphase 5
// since it is not until then data copying has been completed
- DBUG_PRINT("info",("Restarting subscriber: %u on key: [%u,%u]",
+ DBUG_PRINT("info",("Restarting subscriber: %u on key: [%u,%u] %u",
subbPtr.i,
subPtr.p->m_subscriptionId,
subPtr.p->m_subscriptionKey,
diff --git a/storage/ndb/src/kernel/vm/Configuration.cpp b/storage/ndb/src/kernel/vm/Configuration.cpp
index 81b87c818fb..48868309d25 100644
--- a/storage/ndb/src/kernel/vm/Configuration.cpp
+++ b/storage/ndb/src/kernel/vm/Configuration.cpp
@@ -191,7 +191,7 @@ Configuration::init(int argc, char** argv)
}
if (! (val > 0 && val < MAX_NDB_NODES))
{
- ndbout_c("Invalid nodeid specified in nowait-nodes: %d : %s",
+ ndbout_c("Invalid nodeid specified in nowait-nodes: %ld : %s",
val, _nowait_nodes);
exit(-1);
}
diff --git a/storage/ndb/src/kernel/vm/DLHashTable.hpp b/storage/ndb/src/kernel/vm/DLHashTable.hpp
index 4f580f937b7..7469dda7917 100644
--- a/storage/ndb/src/kernel/vm/DLHashTable.hpp
+++ b/storage/ndb/src/kernel/vm/DLHashTable.hpp
@@ -287,6 +287,7 @@ DLHashTableImpl<P, T, U>::remove(Ptr<T> & ptr, const T & key)
Uint32 i;
T * p;
Ptr<T> prev;
+ LINT_INIT(prev.p);
prev.i = RNIL;
i = hashValues[hv];
diff --git a/storage/ndb/src/kernel/vm/RWPool.hpp b/storage/ndb/src/kernel/vm/RWPool.hpp
index c1f4abeed79..a4ad12b52cf 100644
--- a/storage/ndb/src/kernel/vm/RWPool.hpp
+++ b/storage/ndb/src/kernel/vm/RWPool.hpp
@@ -70,6 +70,7 @@ RWPool::getPtr(Uint32 i)
return record;
}
handle_invalid_get_ptr(i);
+ return 0; /* purify: deadcode */
}
#endif
diff --git a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp
index 4e01038d343..1d6676287e8 100644
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.cpp
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.cpp
@@ -1930,6 +1930,7 @@ SimulatedBlock::xfrm_attr(Uint32 attrDesc, CHARSET_INFO* cs,
{
jam();
Uint32 len;
+ LINT_INIT(len);
switch(array){
case NDB_ARRAYTYPE_SHORT_VAR:
len = 1 + srcPtr[0];
diff --git a/storage/ndb/src/kernel/vm/WOPool.hpp b/storage/ndb/src/kernel/vm/WOPool.hpp
index 6b42218368c..ed0d09d2f04 100644
--- a/storage/ndb/src/kernel/vm/WOPool.hpp
+++ b/storage/ndb/src/kernel/vm/WOPool.hpp
@@ -115,6 +115,7 @@ WOPool::getPtr(Uint32 i)
return record;
}
handle_invalid_get_ptr(i);
+ return 0; /* purify: deadcode */
}
#endif
diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
index 7b8795f7ecb..4de8f8ee479 100644
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
@@ -223,6 +223,10 @@ Ndbd_mem_manager::init(bool alloc_less_memory)
InitChunk chunk;
Uint32 remaining = pages - allocated;
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
+ memset((char*) &chunk, 0 , sizeof(chunk));
+#endif
+
if (do_malloc(pages - allocated, &chunk))
{
Uint32 i = 0;
diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
index 999ff6a4cf2..debf5343a90 100644
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -1558,6 +1558,8 @@ CommandInterpreter::executeShow(char* parameters)
case NDB_MGM_NODE_TYPE_UNKNOWN:
ndbout << "Error: Unknown Node Type" << endl;
return -1;
+ case NDB_MGM_NODE_TYPE_MAX:
+ break; /* purify: deadcode */
}
}
diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
index 2268414ae21..58369141ba3 100644
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -2495,7 +2495,7 @@ MgmtSrvr::startBackup(Uint32& backupId, int waitCompleted)
const BackupCompleteRep * const rep =
CAST_CONSTPTR(BackupCompleteRep, signal->getDataPtr());
#ifdef VM_TRACE
- ndbout_c("Backup(%d) completed %d", rep->backupId);
+ ndbout_c("Backup(%d) completed", rep->backupId);
#endif
event.Event = BackupEvent::BackupCompleted;
event.Completed.BackupId = rep->backupId;
@@ -2751,7 +2751,7 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
break;
case 1:
res = i2.set(param, val_64);
- ndbout_c("Updating node %d param: %d to %Ld", node, param, val_32);
+ ndbout_c("Updating node %d param: %d to %u", node, param, val_32);
break;
case 2:
res = i2.set(param, val_char);
diff --git a/storage/ndb/src/ndbapi/DictCache.cpp b/storage/ndb/src/ndbapi/DictCache.cpp
index bdeea3674cd..aa42c1a1bab 100644
--- a/storage/ndb/src/ndbapi/DictCache.cpp
+++ b/storage/ndb/src/ndbapi/DictCache.cpp
@@ -417,7 +417,7 @@ GlobalDictCache::alter_table_rep(const char * name,
{
TableVersion & ver = (* vers)[i];
if(ver.m_version == tableVersion && ver.m_impl &&
- ver.m_impl->m_id == tableId)
+ (Uint32) ver.m_impl->m_id == tableId)
{
ver.m_status = DROPPED;
ver.m_impl->m_status = altered ?
diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index 42ef7bbbaee..dca1432d18a 100644
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -3583,7 +3583,7 @@ NdbDictInterface::createEvent(class Ndb & ndb,
evnt.mi_type = evntConf->getEventType();
evnt.setTable(dataPtr);
} else {
- if (evnt.m_tableImpl->m_id != evntConf->getTableId() ||
+ if ((Uint32) evnt.m_tableImpl->m_id != evntConf->getTableId() ||
evnt.m_tableImpl->m_version != evntConf->getTableVersion() ||
//evnt.m_attrListBitmask != evntConf->getAttrListBitmask() ||
evnt.mi_type != evntConf->getEventType()) {
@@ -3701,7 +3701,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab)
DBUG_RETURN(NULL);
}
if ((tab->m_status != NdbDictionary::Object::Retrieved) ||
- (tab->m_id != ev->m_table_id) ||
+ ((Uint32) tab->m_id != ev->m_table_id) ||
(table_version_major(tab->m_version) !=
table_version_major(ev->m_table_version)))
{
@@ -3731,7 +3731,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab)
DBUG_PRINT("info",("Table: id: %d version: %d",
table.m_id, table.m_version));
- if (table.m_id != ev->m_table_id ||
+ if ((Uint32) table.m_id != ev->m_table_id ||
table_version_major(table.m_version) !=
table_version_major(ev->m_table_version))
{
@@ -3747,7 +3747,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab)
#endif
- if ( attributeList_sz > table.getNoOfColumns() )
+ if ( attributeList_sz > (uint) table.getNoOfColumns() )
{
m_error.code = 241;
DBUG_PRINT("error",("Invalid version, too many columns"));
@@ -3757,7 +3757,7 @@ NdbDictionaryImpl::getEvent(const char * eventName, NdbTableImpl* tab)
assert( (int)attributeList_sz <= table.getNoOfColumns() );
for(unsigned id= 0; ev->m_columns.size() < attributeList_sz; id++) {
- if ( id >= table.getNoOfColumns())
+ if ( id >= (uint) table.getNoOfColumns())
{
m_error.code = 241;
DBUG_PRINT("error",("Invalid version, column %d out of range", id));
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 08b98cf7b48..0b12b9d2f0f 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -58,7 +58,7 @@ print_std(const SubTableData * sdata, LinearSectionPtr ptr[3])
SubTableData::getOperation(sdata->requestInfo));
for (int i = 0; i <= 2; i++) {
printf("sec=%d addr=%p sz=%d\n", i, (void*)ptr[i].p, ptr[i].sz);
- for (int j = 0; j < ptr[i].sz; j++)
+ for (int j = 0; (uint) j < ptr[i].sz; j++)
printf("%08x ", ptr[i].p[j]);
printf("\n");
}
@@ -199,11 +199,11 @@ NdbEventOperationImpl::init(NdbEventImpl& evnt)
m_mergeEvents = false;
#endif
m_ref_count = 0;
- DBUG_PRINT("info", ("m_ref_count = 0 for op: %p", this));
+ DBUG_PRINT("info", ("m_ref_count = 0 for op: 0x%lx", (long) this));
m_has_error= 0;
- DBUG_PRINT("exit",("this: 0x%x oid: %u", this, m_oid));
+ DBUG_PRINT("exit",("this: 0x%lx oid: %u", (long) this, m_oid));
DBUG_VOID_RETURN;
}
@@ -739,8 +739,8 @@ NdbEventOperationImpl::receive_event()
NdbTableImpl *tmp_table_impl= m_eventImpl->m_tableImpl;
m_eventImpl->m_tableImpl = at;
- DBUG_PRINT("info", ("switching table impl 0x%x -> 0x%x",
- tmp_table_impl, at));
+ DBUG_PRINT("info", ("switching table impl 0x%lx -> 0x%lx",
+ (long) tmp_table_impl, (long) at));
// change the rec attrs to refer to the new table object
int i;
@@ -751,9 +751,9 @@ NdbEventOperationImpl::receive_event()
{
int no = p->getColumn()->getColumnNo();
NdbColumnImpl *tAttrInfo = at->getColumn(no);
- DBUG_PRINT("info", ("rec_attr: 0x%x "
- "switching column impl 0x%x -> 0x%x",
- p, p->m_column, tAttrInfo));
+ DBUG_PRINT("info", ("rec_attr: 0x%lx "
+ "switching column impl 0x%lx -> 0x%lx",
+ (long) p, (long) p->m_column, (long) tAttrInfo));
p->m_column = tAttrInfo;
p = p->next();
}
@@ -765,9 +765,9 @@ NdbEventOperationImpl::receive_event()
{
int no = p->getColumn()->getColumnNo();
NdbColumnImpl *tAttrInfo = at->getColumn(no);
- DBUG_PRINT("info", ("rec_attr: 0x%x "
- "switching column impl 0x%x -> 0x%x",
- p, p->m_column, tAttrInfo));
+ DBUG_PRINT("info", ("rec_attr: 0x%lx "
+ "switching column impl 0x%lx -> 0x%lx",
+ (long) p, (long) p->m_column, (long) tAttrInfo));
p->m_column = tAttrInfo;
p = p->next();
}
@@ -1269,8 +1269,9 @@ NdbEventBuffer::getGCIEventOperations(Uint32* iter, Uint32* event_types)
EventBufData_list::Gci_op g = gci_ops->m_gci_op_list[(*iter)++];
if (event_types != NULL)
*event_types = g.event_types;
- DBUG_PRINT("info", ("gci: %d g.op: %x g.event_types: %x",
- (unsigned)gci_ops->m_gci, g.op, g.event_types));
+ DBUG_PRINT("info", ("gci: %u g.op: 0x%lx g.event_types: 0x%lx",
+ (unsigned)gci_ops->m_gci, (long) g.op,
+ (long) g.event_types));
DBUG_RETURN(g.op);
}
DBUG_RETURN(NULL);
@@ -1563,8 +1564,8 @@ NdbEventBuffer::complete_outof_order_gcis()
#endif
m_complete_data.m_data.append_list(&bucket->m_data, start_gci);
#ifdef VM_TRACE
- ndbout_c(" moved %lld rows -> %lld", bucket->m_data.m_count,
- m_complete_data.m_data.m_count);
+ ndbout_c(" moved %ld rows -> %ld", (long) bucket->m_data.m_count,
+ (long) m_complete_data.m_data.m_count);
#else
ndbout_c("");
#endif
@@ -2180,7 +2181,7 @@ NdbEventBuffer::merge_data(const SubTableData * const sdata,
Ev_t* tp = 0;
int i;
- for (i = 0; i < sizeof(ev_t)/sizeof(ev_t[0]); i++) {
+ for (i = 0; (uint) i < sizeof(ev_t)/sizeof(ev_t[0]); i++) {
if (ev_t[i].t1 == t1 && ev_t[i].t2 == t2) {
tp = &ev_t[i];
break;
diff --git a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
index 39dbab423d3..9faf66a1e98 100644
--- a/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbIndexOperation.cpp
@@ -64,6 +64,9 @@ NdbIndexOperation::indxInit(const NdbIndexImpl * anIndex,
case(NdbDictionary::Index::OrderedIndex):
setErrorCodeAbort(4003);
return -1;
+ default:
+ DBUG_ASSERT(0);
+ break;
}
m_theIndex = anIndex;
m_accessTable = anIndex->m_table;
diff --git a/storage/ndb/src/ndbapi/NdbIndexStat.cpp b/storage/ndb/src/ndbapi/NdbIndexStat.cpp
index e490290b6a2..4ae00348606 100644
--- a/storage/ndb/src/ndbapi/NdbIndexStat.cpp
+++ b/storage/ndb/src/ndbapi/NdbIndexStat.cpp
@@ -236,7 +236,7 @@ NdbIndexStat::stat_search(const Area& a, const Uint32* key, Uint32 keylen, Uint3
int
NdbIndexStat::stat_oldest(const Area& a)
{
- Uint32 i, k, m;
+ Uint32 i, k= 0, m;
bool found = false;
m = ~(Uint32)0; // shut up incorrect CC warning
for (i = 0; i < a.m_entries; i++) {
diff --git a/storage/ndb/src/ndbapi/NdbOperationInt.cpp b/storage/ndb/src/ndbapi/NdbOperationInt.cpp
index cd2e3911751..b7fda205450 100644
--- a/storage/ndb/src/ndbapi/NdbOperationInt.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationInt.cpp
@@ -1091,53 +1091,61 @@ NdbOperation::branch_col(Uint32 type,
int
NdbOperation::branch_col_eq(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_eq %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_eq %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::EQ, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_ne(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_ne %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_ne %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::NE, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_lt(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_lt %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_lt %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::LT, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_le(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_le %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_le %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::LE, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_gt(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_gt %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_gt %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::GT, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_ge(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_ge %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_ge %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::GE, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_like(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_like %u %.*s(%u,%d) -> %u", ColId, len, val, len, nopad, Label));
+ INT_DEBUG(("branch_col_like %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::LIKE, ColId, val, len, nopad, Label);
}
int
NdbOperation::branch_col_notlike(Uint32 ColId, const void * val, Uint32 len,
bool nopad, Uint32 Label){
- INT_DEBUG(("branch_col_notlike %u %.*s(%u,%d) -> %u", ColId,len,val,len,nopad,Label));
+ INT_DEBUG(("branch_col_notlike %u %.*s(%u,%d) -> %u", ColId, len, (char*) val, len,
+ nopad, Label));
return branch_col(Interpreter::NOT_LIKE, ColId, val, len, nopad, Label);
}
diff --git a/storage/ndb/src/ndbapi/NdbRecAttr.cpp b/storage/ndb/src/ndbapi/NdbRecAttr.cpp
index 5931a00fcf7..edd48f50ce3 100644
--- a/storage/ndb/src/ndbapi/NdbRecAttr.cpp
+++ b/storage/ndb/src/ndbapi/NdbRecAttr.cpp
@@ -372,7 +372,12 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
j = length;
}
break;
- unknown:
+
+ case NdbDictionary::Column::Undefined:
+ case NdbDictionary::Column::Mediumint:
+ case NdbDictionary::Column::Mediumunsigned:
+ case NdbDictionary::Column::Longvarbinary:
+ unknown:
//default: /* no print functions for the rest, just print type */
out << (int) r.getType();
j = length;
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
index 2d47f79ee09..64dc544b226 100644
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -181,7 +181,8 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
}
bool rangeScan = false;
- if (m_accessTable->m_indexType == NdbDictionary::Index::OrderedIndex)
+ if ( (int) m_accessTable->m_indexType ==
+ (int) NdbDictionary::Index::OrderedIndex)
{
if (m_currentTable == m_accessTable){
// Old way of scanning indexes, should not be allowed
@@ -588,7 +589,7 @@ err4:
theNdbCon->theTransactionIsStarted = false;
theNdbCon->theReleaseOnClose = true;
- if(DEBUG_NEXT_RESULT) ndbout_c("return -1", retVal);
+ if(DEBUG_NEXT_RESULT) ndbout_c("return %d", retVal);
return -1;
}
diff --git a/storage/ndb/src/ndbapi/ObjectMap.hpp b/storage/ndb/src/ndbapi/ObjectMap.hpp
index e3db479f677..b211e2956dd 100644
--- a/storage/ndb/src/ndbapi/ObjectMap.hpp
+++ b/storage/ndb/src/ndbapi/ObjectMap.hpp
@@ -84,7 +84,7 @@ NdbObjectIdMap::map(void * object){
// unlock();
- DBUG_PRINT("info",("NdbObjectIdMap::map(0x%x) %u", object, ff<<2));
+ DBUG_PRINT("info",("NdbObjectIdMap::map(0x%lx) %u", (long) object, ff<<2));
return ff<<2;
}
@@ -102,14 +102,16 @@ NdbObjectIdMap::unmap(Uint32 id, void *object){
m_map[i].m_next = m_firstFree;
m_firstFree = i;
} else {
- ndbout_c("Error: NdbObjectIdMap::::unmap(%u, 0x%x) obj=0x%x", id, object, obj);
- DBUG_PRINT("error",("NdbObjectIdMap::unmap(%u, 0x%x) obj=0x%x", id, object, obj));
+ ndbout_c("Error: NdbObjectIdMap::::unmap(%u, 0x%lx) obj=0x%lx",
+ id, (long) object, (long) obj);
+ DBUG_PRINT("error",("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
+ id, (long) object, (long) obj));
return 0;
}
// unlock();
- DBUG_PRINT("info",("NdbObjectIdMap::unmap(%u) obj=0x%x", id, obj));
+ DBUG_PRINT("info",("NdbObjectIdMap::unmap(%u) obj=0x%lx", id, (long) obj));
return obj;
}
diff --git a/storage/ndb/tools/desc.cpp b/storage/ndb/tools/desc.cpp
index c042f745d9d..2a91d3215f5 100644
--- a/storage/ndb/tools/desc.cpp
+++ b/storage/ndb/tools/desc.cpp
@@ -131,7 +131,7 @@ int desc_logfilegroup(Ndb *myndb, char* name)
assert(dict);
NdbDictionary::LogfileGroup lfg= dict->getLogfileGroup(name);
NdbError err= dict->getNdbError();
- if(err.classification!=ndberror_cl_none)
+ if( (int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: LogfileGroup" << endl;
@@ -153,7 +153,7 @@ int desc_tablespace(Ndb *myndb, char* name)
assert(dict);
NdbDictionary::Tablespace ts= dict->getTablespace(name);
NdbError err= dict->getNdbError();
- if(err.classification!=ndberror_cl_none)
+ if ((int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: Tablespace" << endl;
@@ -175,11 +175,11 @@ int desc_undofile(Ndb_cluster_connection &con, Ndb *myndb, char* name)
con.init_get_next_node(iter);
- while(id= con.get_next_node(iter))
+ while ((id= con.get_next_node(iter)))
{
NdbDictionary::Undofile uf= dict->getUndofile(0, name);
NdbError err= dict->getNdbError();
- if(err.classification!=ndberror_cl_none)
+ if ((int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: Undofile" << endl;
@@ -211,11 +211,11 @@ int desc_datafile(Ndb_cluster_connection &con, Ndb *myndb, char* name)
con.init_get_next_node(iter);
- while(id= con.get_next_node(iter))
+ while ((id= con.get_next_node(iter)))
{
NdbDictionary::Datafile df= dict->getDatafile(id, name);
NdbError err= dict->getNdbError();
- if(err.classification!=ndberror_cl_none)
+ if ((int) err.classification != (int) ndberror_cl_none)
return 0;
ndbout << "Type: Datafile" << endl;
diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp
index 4e3d299239b..b51760266cb 100644
--- a/storage/ndb/tools/restore/Restore.cpp
+++ b/storage/ndb/tools/restore/Restore.cpp
@@ -300,7 +300,13 @@ RestoreMetaData::markSysTables()
strcmp(tableName, "NDB$EVENTS_0") == 0 ||
strcmp(tableName, "sys/def/SYSTAB_0") == 0 ||
strcmp(tableName, "sys/def/NDB$EVENTS_0") == 0 ||
+ /*
+ The following is for old MySQL versions,
+ before we changed the database name of the tables from
+ "cluster_replication" -> "cluster" -> "mysql"
+ */
strcmp(tableName, "cluster_replication/def/" NDB_APPLY_TABLE) == 0 ||
+ strcmp(tableName, "cluster/def/" NDB_APPLY_TABLE) == 0 ||
strcmp(tableName, NDB_REP_DB "/def/" NDB_APPLY_TABLE) == 0 ||
strcmp(tableName, NDB_REP_DB "/def/" NDB_SCHEMA_TABLE)== 0 )
table->isSysTable = true;
diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp
index 507058e2743..7524558a2d6 100644
--- a/storage/ndb/tools/restore/consumer_restore.cpp
+++ b/storage/ndb/tools/restore/consumer_restore.cpp
@@ -494,7 +494,7 @@ BackupRestore::object(Uint32 type, const void * ptr)
NdbDictionary::Tablespace curr = dict->getTablespace(old.getName());
NdbError errobj = dict->getNdbError();
- if(errobj.classification == ndberror_cl_none)
+ if ((int) errobj.classification == (int) ndberror_cl_none)
{
NdbDictionary::Tablespace* currptr = new NdbDictionary::Tablespace(curr);
NdbDictionary::Tablespace * null = 0;
@@ -533,7 +533,7 @@ BackupRestore::object(Uint32 type, const void * ptr)
NdbDictionary::LogfileGroup curr = dict->getLogfileGroup(old.getName());
NdbError errobj = dict->getNdbError();
- if(errobj.classification == ndberror_cl_none)
+ if ((int) errobj.classification == (int) ndberror_cl_none)
{
NdbDictionary::LogfileGroup* currptr =
new NdbDictionary::LogfileGroup(curr);
@@ -680,7 +680,7 @@ BackupRestore::table(const TableS & table){
return true;
const NdbTableImpl & tmptab = NdbTableImpl::getImpl(* table.m_dictTable);
- if(tmptab.m_indexType != NdbDictionary::Index::Undefined){
+ if ((int) tmptab.m_indexType != (int) NdbDictionary::Index::Undefined){
m_indexes.push_back(table.m_dictTable);
return true;
}