2986 Stewart Smith 2008-10-09
use explicit casts for char and uint32
modified:
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
2985 Stewart Smith 2008-10-09
use explicit uint32 casts for 1xuint64 to 2xuint32
modified:
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
2984 Stewart Smith 2008-10-09
signed vs unsigned warnings
modified:
storage/ndb/test/ndbapi/flexAsynch.cpp
2983 Stewart Smith 2008-10-09
use correct types for NDB_TICKS manipulation
modified:
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
2982 Stewart Smith 2008-10-09
signed vs unsigned warning
modified:
storage/ndb/test/ndbapi/flexBench.cpp
2981 Stewart Smith 2008-10-09
squash unused variable warning on non-debug builds.
modified:
storage/ndb/test/ndbapi/testOIBasic.cpp
2980 Stewart Smith 2008-10-09
use explicit uint32 casts for 1xuint64 to 2xuint32
modified:
storage/ndb/src/kernel/blocks/tsman.cpp
2979 Stewart Smith 2008-10-09
struct vs class warning for Suma::Table
modified:
storage/ndb/src/kernel/blocks/suma/Suma.hpp
2978 Stewart Smith 2008-10-09
use explicit uint32 casts for 1xuint64 to 2xuint32 conversions
modified:
storage/ndb/src/kernel/blocks/suma/Suma.cpp
2977 Stewart Smith 2008-10-09
fix "empty conditional" warning by replacing empty define with do {}while(0)
modified:
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
2976 Stewart Smith 2008-10-09
change ndbassert for debug off to be do {} while(0) to squash "empty conditional" warning
seen on MSVC in various parts of NDB.
modified:
storage/ndb/src/kernel/vm/pc.hpp
2975 Stewart Smith 2008-10-09
use explicit uint32 casts for 1xuint64 ot 2xuint32
modified:
storage/ndb/src/kernel/blocks/pgman.cpp
2974 Stewart Smith 2008-10-09
fix support for OM_INIT for large files (> 2GB) on Win32
modified:
storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp
2973 Stewart Smith 2008-10-09
use explicit uint32 casts for 1xuint64 to 2xuint32 conversions
modified:
storage/ndb/src/kernel/blocks/lgman.cpp
2972 Stewart Smith 2008-10-09
warnings: switch with default but no other values, uninit local variable
modified:
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
2971 Stewart Smith 2008-10-09
use explicit casts to unt32 when 1xuint64 to 2xuint32
modified:
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
2970 Stewart Smith 2008-10-09
signed vs unsigned warnings
modified:
storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp
2969 Stewart Smith 2008-10-09
use explicit casts when converting 1xuint64 into 2xuint32
modified:
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
2968 Stewart Smith 2008-10-09
missing semicolon on ndbassert
modified:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
2967 Stewart Smith 2008-10-09
warnings: empty conditional block (without debug, TRACENR macro), use explicit uint32 cast when 1xuint64 -> 2xuint32
modified:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
2966 Stewart Smith 2008-10-09
use explict casts when 1xuint64 -> 2xuint32
squashes MSVC warning
modified:
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
2965 Stewart Smith 2008-10-09
use explict casts to uint32 for sending ire64 over the wire
modified:
storage/ndb/src/kernel/blocks/backup/Backup.cpp
2964 Stewart Smith 2008-10-09
use explicit cast (squashes implicit cast warning)
modified:
storage/ndb/src/common/util/azio.c
2963 Stewart Smith 2008-10-09
use explicit cast when casting Uint64 into two Uint32
MSVC warning
modified:
storage/ndb/src/common/util/Properties.cpp
2962 Stewart Smith 2008-10-09
use explicit casts to 32bit when splitting 64bit number into two 32bit parts.
modified:
storage/ndb/src/common/util/ConfigValues.cpp
2961 Stewart Smith 2008-10-09
use explicit casts to unsigned short to avoid MSVC compiler warnings
modified:
storage/ndb/src/common/util/random.c
2960 Stewart Smith 2008-10-09
rows should be 64bit (printout of status during NR)
modified:
storage/ndb/src/common/debugger/EventLogger.cpp
2959 Stewart Smith 2008-10-09
struct vs class warnings for AttributeS
modified:
storage/ndb/tools/restore/Restore.hpp
2958 Stewart Smith 2008-10-09
Change DBUG macros to do {} while(0) when DBUG is disabled to squash empty conditional warning
Warning seen with MSVC inside NDB with conditional DBUG_DUMP and DBUG_PUSH use.
modified:
include/my_dbug.h
2957 Stewart Smith 2008-10-08
fix ndbinfo_tables.h for MSVC compiler.
MSVC doesn't like zero length arrays, so makes us jump through some more hoops.
modified:
storage/ndb/include/ndbinfo.h
storage/ndb/src/kernel/blocks/dbinfo/ndbinfo_tables.h
=== modified file 'include/my_dbug.h'
--- a/include/my_dbug.h 2008-03-31 07:40:39 +0000
+++ b/include/my_dbug.h 2008-10-08 13:38:11 +0000
@@ -92,14 +92,14 @@ extern FILE *_db_fp_(void);
#define DBUG_EVALUATE(keyword,a1,a2) (a2)
#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2)
#define DBUG_PRINT(keyword,arglist) do { } while(0)
-#define DBUG_PUSH(a1)
+#define DBUG_PUSH(a1) do { } while(0)
#define DBUG_SET(a1)
#define DBUG_SET_INITIAL(a1)
#define DBUG_POP()
#define DBUG_PROCESS(a1)
#define DBUG_SETJMP(a1) setjmp(a1)
#define DBUG_LONGJMP(a1) longjmp(a1)
-#define DBUG_DUMP(keyword,a1,a2)
+#define DBUG_DUMP(keyword,a1,a2) do { } while(0)
#define DBUG_END()
#define DBUG_ASSERT(A) do { } while(0)
#define DBUG_LOCK_FILE
=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp 2008-08-28 07:48:39 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp 2008-10-08 13:47:41 +0000
@@ -486,7 +486,7 @@ void getTextNR_CopyFragDone(QQQQ) {
//-----------------------------------------------------------------------
// REPORT Node Restart copied a fragment.
//-----------------------------------------------------------------------
- Uint32 rows = theData[4] + (Uint64(theData[5]) << 32);
+ Uint64 rows = theData[4] + (Uint64(theData[5]) << 32);
Uint64 bytes = theData[6] + (Uint64(theData[7]) << 32);
BaseString::snprintf(m_text, m_text_len,
"Table ID = %u, fragment ID = %u have been synced "
=== modified file 'storage/ndb/src/common/util/ConfigValues.cpp'
--- a/storage/ndb/src/common/util/ConfigValues.cpp 2007-03-06 17:38:30 +0000
+++ b/storage/ndb/src/common/util/ConfigValues.cpp 2008-10-08 13:51:23 +0000
@@ -617,8 +617,8 @@ ConfigValues::pack(void * _dst, Uint32 _
break;
case Int64Type:{
Uint64 i64 = * get64(val);
- Uint32 hi = (i64 >> 32);
- Uint32 lo = (i64 & 0xFFFFFFFF);
+ Uint32 hi = (Uint32)(i64 >> 32);
+ Uint32 lo = (Uint32)(i64 & 0xFFFFFFFF);
* (Uint32*)dst = htonl(key); dst += 4;
* (Uint32*)dst = htonl(hi); dst += 4;
* (Uint32*)dst = htonl(lo); dst += 4;
=== modified file 'storage/ndb/src/common/util/Properties.cpp'
--- a/storage/ndb/src/common/util/Properties.cpp 2008-08-21 06:33:53 +0000
+++ b/storage/ndb/src/common/util/Properties.cpp 2008-10-08 13:53:01 +0000
@@ -796,8 +796,8 @@ PropertiesImpl::pack(Uint32 *& buf, cons
break;
case PropertiesType_Uint64:{
Uint64 val = * (Uint64 *)content[i]->value;
- Uint32 hi = (val >> 32);
- Uint32 lo = (val & 0xFFFFFFFF);
+ Uint32 hi = (Uint32)(val >> 32);
+ Uint32 lo = (Uint32)(val & 0xFFFFFFFF);
* (Uint32 *)valBuf = htonl(hi);
* (Uint32 *)(valBuf + 4) = htonl(lo);
}
=== modified file 'storage/ndb/src/common/util/azio.c'
--- a/storage/ndb/src/common/util/azio.c 2008-08-21 06:36:44 +0000
+++ b/storage/ndb/src/common/util/azio.c 2008-10-08 13:54:36 +0000
@@ -923,7 +923,7 @@ void putLong (azio_stream *s, uLong x)
for (n = 0; n < 4; n++)
{
s->stream.avail_out--;
- *(s->stream.next_out) = x & 0xff;
+ *(s->stream.next_out) = (Bytef)(x & 0xff);
s->stream.next_out++;
write_buffer(s);
x >>= 8;
=== modified file 'storage/ndb/src/common/util/random.c'
--- a/storage/ndb/src/common/util/random.c 2008-10-08 02:24:03 +0000
+++ b/storage/ndb/src/common/util/random.c 2008-10-08 13:50:16 +0000
@@ -68,8 +68,8 @@ static void localRandom48Init(long int s
seedval &= 0xffffffffl;
#if USHRT_MAX == 0xffffU
- buffer->x[2] = seedval >> 16;
- buffer->x[1] = seedval & 0xffffl;
+ buffer->x[2] = (unsigned short)(seedval >> 16);
+ buffer->x[1] = (unsigned short)(seedval & 0xffffl);
buffer->x[0] = 0x330e;
buffer->a[2] = 0x5;
@@ -126,9 +126,9 @@ static void localRandom48(DRand48Data *b
loc_result = X * a + buffer->c;
- buffer->x[0] = loc_result & 0xffff;
- buffer->x[1] = (loc_result >> 16) & 0xffff;
- buffer->x[2] = (loc_result >> 32) & 0xffff;
+ buffer->x[0] = (unsigned short)(loc_result & 0xffff);
+ buffer->x[1] = (unsigned short)((loc_result >> 16) & 0xffff);
+ buffer->x[2] = (unsigned short)((loc_result >> 32) & 0xffff);
}
else {
X = (Uint64)buffer->x[2] << 16 |
=== modified file 'storage/ndb/src/kernel/blocks/backup/Backup.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp 2008-10-06 08:04:13 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp 2008-10-08 13:56:11 +0000
@@ -263,8 +263,8 @@ Backup::execCONTINUEB(Signal* signal)
fragInfo->SectionLength = htonl(sz);
fragInfo->TableId = htonl(fragPtr.p->tableId);
fragInfo->FragmentNo = htonl(fragPtr_I);
- fragInfo->NoOfRecordsLow = htonl(fragPtr.p->noOfRecords & 0xFFFFFFFF);
- fragInfo->NoOfRecordsHigh = htonl(fragPtr.p->noOfRecords >> 32);
+ fragInfo->NoOfRecordsLow = htonl((Uint32)(fragPtr.p->noOfRecords & 0xFFFFFFFF));
+ fragInfo->NoOfRecordsHigh = htonl((Uint32)(fragPtr.p->noOfRecords >> 32));
fragInfo->FilePosLow = htonl(0);
fragInfo->FilePosHigh = htonl(0);
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-10-08 08:22:17 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-10-08 13:58:58 +0000
@@ -734,8 +734,8 @@ Dbdict::packFileIntoPages(SimpleProperti
f.FileType = f_ptr.p->m_type;
f.FilegroupId = f_ptr.p->m_filegroup_id;; //group.m_id;
- f.FileSizeHi = (f_ptr.p->m_file_size >> 32);
- f.FileSizeLo = (f_ptr.p->m_file_size & 0xFFFFFFFF);
+ f.FileSizeHi = (Uint32)(f_ptr.p->m_file_size >> 32);
+ f.FileSizeLo = (Uint32)(f_ptr.p->m_file_size & 0xFFFFFFFF);
f.FileFreeExtents= free_extents;
f.FileId = f_ptr.p->key;
f.FileVersion = f_ptr.p->m_version;
@@ -5742,10 +5742,10 @@ Dbdict::execADD_FRAGREQ(Signal* signal)
req->kValue = tabPtr.p->kValue;
req->lh3DistrBits = 0; //lhDistrBits;
req->lh3PageBits = 0; //lhPageBits;
- req->maxRowsLow = maxRows & 0xFFFFFFFF;
- req->maxRowsHigh = maxRows >> 32;
- req->minRowsLow = minRows & 0xFFFFFFFF;
- req->minRowsHigh = minRows >> 32;
+ req->maxRowsLow = (Uint32)(maxRows & 0xFFFFFFFF);
+ req->maxRowsHigh = (Uint32)(maxRows >> 32);
+ req->minRowsLow = (Uint32)(minRows & 0xFFFFFFFF);
+ req->minRowsHigh = (Uint32)(minRows >> 32);
Uint32 keyLen = tabPtr.p->tupKeyLength;
req->keyLength = keyLen; // wl-2066 no more "long keys"
req->nextLCP = lcpNo;
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-10-08 08:24:37 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2008-10-08 14:07:13 +0000
@@ -242,8 +242,8 @@ void Dbdih::sendINCL_NODEREQ(Signal* sig
signal->theData[1] = c_nodeStartMaster.startNode;
signal->theData[2] = c_nodeStartMaster.failNr;
signal->theData[3] = 0;
- signal->theData[4] = m_micro_gcp.m_current_gci >> 32;
- signal->theData[5] = m_micro_gcp.m_current_gci & 0xFFFFFFFF;
+ signal->theData[4] = (Uint32)(m_micro_gcp.m_current_gci >> 32);
+ signal->theData[5] = (Uint32)(m_micro_gcp.m_current_gci & 0xFFFFFFFF);
sendSignal(nodeDihRef, GSN_INCL_NODEREQ, signal, 6, JBA);
}//Dbdih::sendINCL_NODEREQ()
@@ -2427,7 +2427,7 @@ void Dbdih::dihCopyCompletedLab(Signal*
{
BlockReference ref = calcDictBlockRef(c_nodeStartMaster.startNode);
DictStartReq * req = (DictStartReq*)&signal->theData[0];
- req->restartGci = m_micro_gcp.m_new_gci >> 32;
+ req->restartGci = (Uint32)(m_micro_gcp.m_new_gci >> 32);
req->senderRef = reference();
sendSignal(ref, GSN_DICTSTARTREQ,
signal, DictStartReq::SignalLength, JBB);
@@ -5249,8 +5249,8 @@ void Dbdih::execMASTER_GCPREQ(Signal* si
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
CLEAR_ERROR_INSERT_VALUE;
signal->theData[0] = c_error_7181_ref;
- signal->theData[1] = m_micro_gcp.m_old_gci >> 32;
- signal->theData[2] = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ signal->theData[1] = (Uint32)(m_micro_gcp.m_old_gci >> 32);
+ signal->theData[2] = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
execGCP_TCFINISHED(signal);
}
@@ -5281,8 +5281,8 @@ void Dbdih::execMASTER_GCPREQ(Signal* si
{
GCPNoMoreTrans* req2 = (GCPNoMoreTrans*)signal->getDataPtrSend();
req2->senderData = m_micro_gcp.m_master_ref;
- req2->gci_hi = m_micro_gcp.m_old_gci >> 32;
- req2->gci_lo = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ req2->gci_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
+ req2->gci_lo = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
sendSignal(clocaltcblockref, GSN_GCP_NOMORETRANS, signal,
GCPNoMoreTrans::SignalLength, JBB);
}
@@ -5313,7 +5313,7 @@ void Dbdih::execMASTER_GCPREQ(Signal* si
masterGCPConf->gcpState = gcpState;
masterGCPConf->senderNodeId = cownNodeId;
masterGCPConf->failedNodeId = failedNodeId;
- masterGCPConf->newGCP_hi = m_micro_gcp.m_new_gci >> 32;
+ masterGCPConf->newGCP_hi = (Uint32)(m_micro_gcp.m_new_gci >> 32);
masterGCPConf->latestLCP = SYSFILE->latestLCP_ID;
masterGCPConf->oldestRestorableGCI = SYSFILE->oldestRestorableGCI;
masterGCPConf->keepGCI = SYSFILE->keepGCI;
@@ -5331,8 +5331,8 @@ void Dbdih::execMASTER_GCPREQ(Signal* si
ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ");
CLEAR_ERROR_INSERT_VALUE;
signal->theData[0] = c_error_7181_ref;
- signal->theData[1] = m_micro_gcp.m_old_gci >> 32;
- signal->theData[2] = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ signal->theData[1] = (Uint32)(m_micro_gcp.m_old_gci >> 32);
+ signal->theData[2] = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
execGCP_TCFINISHED(signal);
}
@@ -8400,8 +8400,8 @@ void Dbdih::execDIVERIFYREQ(Signal* sign
// theData[0] already contains the correct information so
// we need not touch it.
/*-----------------------------------------------------------------------*/
- signal->theData[1] = m_micro_gcp.m_current_gci >> 32;
- signal->theData[2] = m_micro_gcp.m_current_gci & 0xFFFFFFFF;
+ signal->theData[1] = (Uint32)(m_micro_gcp.m_current_gci >> 32);
+ signal->theData[2] = (Uint32)(m_micro_gcp.m_current_gci & 0xFFFFFFFF);
signal->theData[3] = 0;
return;
}//if
@@ -8818,8 +8818,8 @@ void Dbdih::execGCP_NODEFINISH(Signal* s
{
SubGcpCompleteRep * const rep = (SubGcpCompleteRep*)signal->getDataPtr();
rep->senderRef = reference();
- rep->gci_hi = m_micro_gcp.m_old_gci >> 32;
- rep->gci_lo = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ rep->gci_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
+ rep->gci_lo = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
rep->flags = SubGcpCompleteRep::IN_MEMORY;
#ifdef ERROR_INSERT
@@ -8859,8 +8859,8 @@ void Dbdih::execGCP_NODEFINISH(Signal* s
*/
m_micro_gcp.m_master.m_state = MicroGcp::M_GCP_IDLE;
- Uint32 curr_hi = m_micro_gcp.m_current_gci >> 32;
- Uint32 old_hi = m_micro_gcp.m_old_gci >> 32;
+ Uint32 curr_hi = (Uint32)(m_micro_gcp.m_current_gci >> 32);
+ Uint32 old_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
if (m_micro_gcp.m_enabled)
{
@@ -9207,9 +9207,9 @@ void Dbdih::execGCP_COMMIT(Signal* signa
GCPNodeFinished* conf = (GCPNodeFinished*)signal->getDataPtrSend();
conf->nodeId = cownNodeId;
- conf->gci_hi = m_micro_gcp.m_old_gci >> 32;
+ conf->gci_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
conf->failno = cfailurenr;
- conf->gci_lo = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ conf->gci_lo = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
sendSignal(masterRef, GSN_GCP_NODEFINISH, signal,
GCPNodeFinished::SignalLength, JBB);
return;
@@ -9227,8 +9227,8 @@ void Dbdih::execGCP_COMMIT(Signal* signa
GCPNoMoreTrans* req2 = (GCPNoMoreTrans*)signal->getDataPtrSend();
req2->senderData = calcDihBlockRef(masterNodeId);
- req2->gci_hi = m_micro_gcp.m_old_gci >> 32;
- req2->gci_lo = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ req2->gci_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
+ req2->gci_lo = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
sendSignal(clocaltcblockref, GSN_GCP_NOMORETRANS, signal,
GCPNoMoreTrans::SignalLength, JBB);
return;
@@ -9278,9 +9278,9 @@ void Dbdih::execGCP_TCFINISHED(Signal* s
GCPNodeFinished* conf2 = (GCPNodeFinished*)signal->getDataPtrSend();
conf2->nodeId = cownNodeId;
- conf2->gci_hi = m_micro_gcp.m_old_gci >> 32;
+ conf2->gci_hi = (Uint32)(m_micro_gcp.m_old_gci >> 32);
conf2->failno = cfailurenr;
- conf2->gci_lo = m_micro_gcp.m_old_gci & 0xFFFFFFFF;
+ conf2->gci_lo = (Uint32)(m_micro_gcp.m_old_gci & 0xFFFFFFFF);
sendSignal(retRef, GSN_GCP_NODEFINISH, signal,
GCPNodeFinished::SignalLength, JBB);
}//Dbdih::execGCP_TCFINISHED()
@@ -11383,7 +11383,7 @@ void Dbdih::execTCGETOPSIZECONF(Signal*
// one global checkpoints between each local checkpoint that we start up.
/* ----------------------------------------------------------------------- */
c_lcpState.ctimer = 0;
- c_lcpState.keepGci = m_micro_gcp.m_old_gci >> 32;
+ c_lcpState.keepGci = (Uint32)(m_micro_gcp.m_old_gci >> 32);
c_lcpState.oldestRestorableGci = SYSFILE->oldestRestorableGCI;
/* ----------------------------------------------------------------------- */
@@ -13068,12 +13068,12 @@ void Dbdih::allocStoredReplica(Fragments
newReplicaPtr.p->lcpStatus[i] = ZINVALID;
}//for
newReplicaPtr.p->noCrashedReplicas = 0;
- newReplicaPtr.p->initialGci = m_micro_gcp.m_current_gci >> 32;
+ newReplicaPtr.p->initialGci = (Uint32)(m_micro_gcp.m_current_gci >> 32);
for (i = 0; i < MAX_CRASHED_REPLICAS; i++) {
newReplicaPtr.p->replicaLastGci[i] = (Uint32)-1;
newReplicaPtr.p->createGci[i] = 0;
}//for
- newReplicaPtr.p->createGci[0] = m_micro_gcp.m_current_gci >> 32;
+ newReplicaPtr.p->createGci[0] = (Uint32)(m_micro_gcp.m_current_gci >> 32);
newReplicaPtr.p->nextLcp = 0;
newReplicaPtr.p->procNode = nodeId;
newReplicaPtr.p->lcpOngoingFlag = false;
@@ -13218,8 +13218,8 @@ void Dbdih::emptyverificbuffer(Signal* s
clastVerifyQueue = RNIL;
}//if
signal->theData[0] = localApiConnectptr.i;
- signal->theData[1] = m_micro_gcp.m_current_gci >> 32;
- signal->theData[2] = m_micro_gcp.m_current_gci & 0xFFFFFFFF;
+ signal->theData[1] = (Uint32)(m_micro_gcp.m_current_gci >> 32);
+ signal->theData[2] = (Uint32)(m_micro_gcp.m_current_gci & 0xFFFFFFFF);
signal->theData[3] = 0;
sendSignal(clocaltcblockref, GSN_DIVERIFYCONF, signal, 4, JBB);
if (aContinueB == true) {
=== modified file 'storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp'
--- a/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp 2008-10-06 07:17:40 +0000
+++ b/storage/ndb/src/kernel/blocks/dbinfo/Dbinfo.cpp 2008-10-08 14:08:34 +0000
@@ -173,7 +173,7 @@ void Dbinfo::execDUMP_STATE_ORD(Signal*
jam();
ndbout_c("--- BEGIN NDB$INFO.TABLES ---");
char create_sql[512];
- for(int i=0;i<number_ndbinfo_tables;i++)
+ for(Uint32 i=0;i<number_ndbinfo_tables;i++)
{
ndbinfo_create_sql(ndbinfo_tables[i],
create_sql, sizeof(create_sql));
@@ -185,7 +185,7 @@ void Dbinfo::execDUMP_STATE_ORD(Signal*
case DumpStateOrd::DbinfoListColumns:
jam();
ndbout_c("--- BEGIN NDB$INFO.COLUMNS ---");
- for(int i=0;i<number_ndbinfo_tables;i++)
+ for(Uint32 i=0;i<number_ndbinfo_tables;i++)
{
struct ndbinfo_table *t= ndbinfo_tables[i];
@@ -231,7 +231,8 @@ void Dbinfo::execDBINFO_SCANREQ(Signal *
const Uint32 colBitmapHi= req.colBitmapHi;
const Uint32 requestInfo= req.requestInfo;
- int i, j;
+ Uint32 i;
+ int j;
int startid= 0;
int startTableId, startColumnId;
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2008-10-02 21:58:44 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2008-10-08 14:05:52 +0000
@@ -163,7 +163,7 @@ static int TRACENR_FLAG = 0;
#define CLEAR_TRACENR_FLAG TRACENR_FLAG = 0
#else
#define TRACENR_FLAG 0
-#define TRACENR(x)
+#define TRACENR(x) do { } while(0)
#define SET_TRACENR_FLAG
#define CLEAR_TRACENR_FLAG
#endif
@@ -5778,7 +5778,7 @@ void Dblqh::packLqhkeyreqLab(Signal* sig
if (regTcPtr->attrInfoIVal != RNIL)
{
ndbassert(!( regTcPtr->m_flags &
- TcConnectionrec::OP_SAVEATTRINFO))
+ TcConnectionrec::OP_SAVEATTRINFO));
releaseSection(regTcPtr->attrInfoIVal);
regTcPtr->attrInfoIVal= RNIL;
}
@@ -14031,8 +14031,8 @@ void Dblqh::openFileRw(Signal* signal, L
req->auto_sync_size = MAX_REDO_PAGES_WITHOUT_SYNCH * sizeof(LogPageRecord);
Uint64 sz = clogFileSize;
sz *= 1024; sz *= 1024;
- req->file_size_hi = sz >> 32;
- req->file_size_lo = sz & 0xFFFFFFFF;
+ req->file_size_hi = (Uint32)(sz >> 32);
+ req->file_size_lo = (Uint32)(sz & 0xFFFFFFFF);
sendSignal(NDBFS_REF, GSN_FSOPENREQ, signal, FsOpenReq::SignalLength, JBA);
}//Dblqh::openFileRw()
@@ -14095,8 +14095,8 @@ void Dblqh::openNextLogfile(Signal* sign
req->auto_sync_size = MAX_REDO_PAGES_WITHOUT_SYNCH * sizeof(LogPageRecord);
Uint64 sz = clogFileSize;
sz *= 1024; sz *= 1024;
- req->file_size_hi = sz >> 32;
- req->file_size_lo = sz & 0xFFFFFFFF;
+ req->file_size_hi = (Uint32)(sz >> 32);
+ req->file_size_lo = (Uint32)(sz & 0xFFFFFFFF);
sendSignal(NDBFS_REF, GSN_FSOPENREQ, signal, FsOpenReq::SignalLength, JBA);
}//if
}//Dblqh::openNextLogfile()
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2008-10-03 08:22:13 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2008-10-08 14:11:47 +0000
@@ -1931,8 +1931,8 @@ Dbtup::updateDynFixedSizeNotNULL(Uint32*
Uint32 bm_idx= (pos >> 5);
/* Store bits in little-endian so fit with length byte and trailing padding*/
Uint64 bm_mask = ((Uint64(1) << nullbits) - 1) << (pos & 31);
- Uint32 bm_mask1 = bm_mask & 0xFFFFFFFF;
- Uint32 bm_mask2 = bm_mask >> 32;
+ Uint32 bm_mask1 = (Uint32)(bm_mask & 0xFFFFFFFF);
+ Uint32 bm_mask2 = (Uint32)(bm_mask >> 32);
jam();
/* Set all the bits in the NULL bitmap. */
@@ -1986,8 +1986,8 @@ Dbtup::updateDynFixedSizeNULLable(Uint32
Uint32 bm_idx= (pos >> 5);
/* Store bits in little-endian so fit with length byte and trailing padding*/
Uint64 bm_mask = ~(((Uint64(1) << nullbits) - 1) << (pos & 31));
- Uint32 bm_mask1 = bm_mask & 0xFFFFFFFF;
- Uint32 bm_mask2 = bm_mask >> 32;
+ Uint32 bm_mask1 = (Uint32)(bm_mask & 0xFFFFFFFF);
+ Uint32 bm_mask2 = (Uint32)(bm_mask >> 32);
Uint32 newIndex= req_struct->in_buf_index + 1;
if (newIndex <= req_struct->in_buf_len) {
=== modified file 'storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp'
--- a/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp 2008-10-06 10:06:32 +0000
+++ b/storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp 2008-10-08 14:13:26 +0000
@@ -298,11 +298,8 @@ void
DbUtil::execCONTINUEB(Signal* signal){
jamEntry();
const Uint32 Tdata0 = signal->theData[0];
-
- switch(Tdata0){
- default:
- ndbrequire(0);
- }
+
+ ndbrequire(0);
}
void
@@ -690,6 +687,8 @@ void DbUtil::execDBINFO_SCANREQ(Signal *
struct dbinfo_row r;
struct dbinfo_ratelimit rl;
+ dbinfo_ratelimit_init(&rl, &req);
+
jamEntry();
if(req.tableId == NDBINFO_POOLS_TABLEID)
=== modified file 'storage/ndb/src/kernel/blocks/lgman.cpp'
--- a/storage/ndb/src/kernel/blocks/lgman.cpp 2008-10-08 05:20:32 +0000
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp 2008-10-08 14:14:43 +0000
@@ -625,8 +625,8 @@ Lgman::open_file(Signal* signal, Ptr<Und
req->page_size = File_formats::NDB_PAGE_SIZE;
Uint64 size = (Uint64)ptr.p->m_file_size * (Uint64)File_formats::NDB_PAGE_SIZE;
- req->file_size_hi = size >> 32;
- req->file_size_lo = size & 0xFFFFFFFF;
+ req->file_size_hi = (Uint32)(size >> 32);
+ req->file_size_lo = (Uint32)(size & 0xFFFFFFFF);
sendSignal(NDBFS_REF, GSN_FSOPENREQ, signal, FsOpenReq::SignalLength, JBB,
handle);
@@ -1115,8 +1115,8 @@ Logfile_client::sync_lsn(Signal* signal,
ptr.p->m_state |= Lgman::Logfile_group::LG_FORCE_SYNC_THREAD;
signal->theData[0] = LgmanContinueB::FORCE_LOG_SYNC;
signal->theData[1] = ptr.i;
- signal->theData[2] = lsn >> 32;
- signal->theData[3] = lsn & 0xFFFFFFFF;
+ signal->theData[2] = (Uint32)(lsn >> 32);
+ signal->theData[3] = (Uint32)(lsn & 0xFFFFFFFF);
m_lgman->sendSignalWithDelay(m_lgman->reference(),
GSN_CONTINUEB, signal, 10, 4);
}
@@ -1148,8 +1148,8 @@ Lgman::force_log_sync(Signal* signal,
File_formats::Undofile::Undo_page* undo=
(File_formats::Undofile::Undo_page*)page;
- undo->m_page_header.m_page_lsn_lo = lsn & 0xFFFFFFFF;
- undo->m_page_header.m_page_lsn_hi = lsn >> 32;
+ undo->m_page_header.m_page_lsn_lo = (Uint32)(lsn & 0xFFFFFFFF);
+ undo->m_page_header.m_page_lsn_hi = (Uint32)(lsn >> 32);
undo->m_words_used= File_formats::UNDO_PAGE_WORDS - free;
/**
@@ -1176,8 +1176,8 @@ Lgman::force_log_sync(Signal* signal,
ndbrequire(ptr.p->m_state & Lgman::Logfile_group::LG_FORCE_SYNC_THREAD);
signal->theData[0] = LgmanContinueB::FORCE_LOG_SYNC;
signal->theData[1] = ptr.i;
- signal->theData[2] = max_req_lsn >> 32;
- signal->theData[3] = max_req_lsn & 0xFFFFFFFF;
+ signal->theData[2] = (Uint32)(max_req_lsn >> 32);
+ signal->theData[3] = (Uint32)(max_req_lsn & 0xFFFFFFFF);
sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 10, 4);
}
else
@@ -1254,8 +1254,8 @@ next:
Uint64 lsn= ptr.p->m_last_lsn - 1;
File_formats::Undofile::Undo_page* undo=
(File_formats::Undofile::Undo_page*)page;
- undo->m_page_header.m_page_lsn_lo = lsn & 0xFFFFFFFF;
- undo->m_page_header.m_page_lsn_hi = lsn >> 32;
+ undo->m_page_header.m_page_lsn_lo = (Uint32)(lsn & 0xFFFFFFFF);
+ undo->m_page_header.m_page_lsn_hi = (Uint32)(lsn >> 32);
undo->m_words_used= File_formats::UNDO_PAGE_WORDS - free;
/**
@@ -1418,8 +1418,8 @@ Lgman::flush_log(Signal* signal, Ptr<Log
File_formats::Undofile::Undo_page* undo=
(File_formats::Undofile::Undo_page*)page;
- undo->m_page_header.m_page_lsn_lo = lsn & 0xFFFFFFFF;
- undo->m_page_header.m_page_lsn_hi = lsn >> 32;
+ undo->m_page_header.m_page_lsn_lo = (Uint32)(lsn & 0xFFFFFFFF);
+ undo->m_page_header.m_page_lsn_hi = (Uint32)(lsn >> 32);
undo->m_words_used= File_formats::UNDO_PAGE_WORDS - free;
/**
@@ -1825,8 +1825,8 @@ Lgman::execLCP_FRAG_ORD(Signal* signal)
else
{
Uint32 *dst= get_log_buffer(ptr, (sizeof(undo) >> 2) + 2);
- * dst++ = last_lsn >> 32;
- * dst++ = last_lsn & 0xFFFFFFFF;
+ * dst++ = (Uint32)(last_lsn >> 32);
+ * dst++ = (Uint32)(last_lsn & 0xFFFFFFFF);
memcpy(dst, undo, sizeof(undo));
ndbrequire(ptr.p->m_free_file_words >= (sizeof(undo) >> 2));
ptr.p->m_free_file_words -= ((sizeof(undo) >> 2) + 2);
@@ -2077,8 +2077,8 @@ Logfile_client::add_entry(const Change*
else
{
dst= m_lgman->get_log_buffer(ptr, tot + 2);
- * dst++ = last_lsn >> 32;
- * dst++ = last_lsn & 0xFFFFFFFF;
+ * dst++ = (Uint32)(last_lsn >> 32);
+ * dst++ = (Uint32)(last_lsn & 0xFFFFFFFF);
for(i= 0; i<cnt; i++)
{
memcpy(dst, src[i].ptr, 4*src[i].len);
@@ -3098,8 +3098,8 @@ Lgman::execEND_LCP_CONF(Signal* signal)
else
{
Uint32 *dst= get_log_buffer(ptr, (sizeof(undo) >> 2) + 2);
- * dst++ = last_lsn >> 32;
- * dst++ = last_lsn & 0xFFFFFFFF;
+ * dst++ = (Uint32)(last_lsn >> 32);
+ * dst++ = (Uint32)(last_lsn & 0xFFFFFFFF);
memcpy(dst, undo, sizeof(undo));
ndbrequire(ptr.p->m_free_file_words >= ((sizeof(undo) >> 2) + 2));
ptr.p->m_free_file_words -= ((sizeof(undo) >> 2) + 2);
@@ -3194,8 +3194,8 @@ void Lgman::execGET_TABINFOREQ(Signal* s
conf->senderData= senderData;
conf->tableId= tableId;
- conf->freeWordsHi= ptr.p->m_free_file_words >> 32;
- conf->freeWordsLo= ptr.p->m_free_file_words & 0xFFFFFFFF;
+ conf->freeWordsHi= (Uint32)(ptr.p->m_free_file_words >> 32);
+ conf->freeWordsLo= (Uint32)(ptr.p->m_free_file_words & 0xFFFFFFFF);
conf->tableType= DictTabInfo::LogfileGroup;
conf->senderRef= reference();
sendSignal(retRef, GSN_GET_TABINFO_CONF, signal,
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp 2008-09-18 16:43:51 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp 2008-10-08 14:16:02 +0000
@@ -108,14 +108,16 @@ void Win32AsyncFile::openReq(Request* re
if (flags & FsOpenReq::OM_INIT)
{
- off_t off = 0;
- const off_t sz = request->par.open.file_size;
+ LARGE_INTEGER off;
+ off.QuadPart= 0;
+ LARGE_INTEGER sz;
+ sz.QuadPart= request->par.open.file_size;
char buf[4096];
bzero(buf,sizeof(buf));
- while(off < sz)
+ while(off.QuadPart < sz.QuadPart)
{
- DWORD dwSFP= SetFilePointer(hFile, off, NULL, FILE_BEGIN);
- if(dwSFP != off)
+ BOOL r= SetFilePointerEx(hFile, off, NULL, FILE_BEGIN);
+ if(r==0)
{
request->error= GetLastError();
return;
@@ -126,7 +128,7 @@ void Win32AsyncFile::openReq(Request* re
{
request->error= GetLastError();
}
- off+=sizeof(buf);
+ off.QuadPart+=sizeof(buf);
}
}
=== modified file 'storage/ndb/src/kernel/blocks/pgman.cpp'
--- a/storage/ndb/src/kernel/blocks/pgman.cpp 2008-10-08 08:25:52 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp 2008-10-08 14:17:08 +0000
@@ -1359,8 +1359,8 @@ Pgman::pageout(Signal* signal, Ptr<Page_
m_global_page_pool.getPtr(pagePtr, ptr.p->m_real_page_i);
File_formats::Datafile::Data_page* page =
(File_formats::Datafile::Data_page*)pagePtr.p;
- page->m_page_header.m_page_lsn_hi = ptr.p->m_lsn >> 32;
- page->m_page_header.m_page_lsn_lo = ptr.p->m_lsn & 0xFFFFFFFF;
+ page->m_page_header.m_page_lsn_hi = (Uint32)(ptr.p->m_lsn >> 32);
+ page->m_page_header.m_page_lsn_lo = (Uint32)(ptr.p->m_lsn & 0xFFFFFFFF);
// undo WAL
Logfile_client::Request req;
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-10-06 08:04:13 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-10-08 14:23:32 +0000
@@ -3983,8 +3983,8 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* s
Buffer_page* page= (Buffer_page*)
m_tup->c_page_pool.getPtr(pos.m_page_id);
ndbout_c("takeover %d", pos.m_page_id);
- page->m_max_gci_hi = pos.m_max_gci >> 32;
- page->m_max_gci_lo = pos.m_max_gci & 0xFFFFFFFF;
+ page->m_max_gci_hi = (Uint32)(pos.m_max_gci >> 32);
+ page->m_max_gci_lo = (Uint32)(pos.m_max_gci & 0xFFFFFFFF);
ndbassert(pos.m_max_gci != 0);
page->m_words_used = pos.m_page_pos;
page->m_next_page = RNIL;
@@ -5082,8 +5082,8 @@ loop:
pos.m_page_pos += Buffer_page::GCI_SZ32;
bucket->m_buffer_head = pos;
* ptr++ = (sz + Buffer_page::GCI_SZ32);
- * ptr++ = gci >> 32;
- * ptr++ = gci & 0xFFFFFFFF;
+ * ptr++ = (Uint32)(gci >> 32);
+ * ptr++ = (Uint32)(gci & 0xFFFFFFFF);
return ptr;
}
else
@@ -5105,8 +5105,8 @@ loop:
if(likely(pos.m_page_id != RNIL))
{
- page->m_max_gci_hi = pos.m_max_gci >> 32;
- page->m_max_gci_lo = pos.m_max_gci & 0xFFFFFFFF;
+ page->m_max_gci_hi = (Uint32)(pos.m_max_gci >> 32);
+ page->m_max_gci_lo = (Uint32)(pos.m_max_gci & 0xFFFFFFFF);
page->m_words_used = pos.m_page_pos - sz;
page->m_next_page= next;
ndbassert(pos.m_max_gci != 0);
@@ -5322,8 +5322,8 @@ Suma::release_gci(Signal* signal, Uint32
bucket->m_buffer_tail = next_page;
signal->theData[0] = SumaContinueB::RELEASE_GCI;
signal->theData[1] = buck;
- signal->theData[2] = gci >> 32;
- signal->theData[3] = gci & 0xFFFFFFFF;
+ signal->theData[2] = (Uint32)(gci >> 32);
+ signal->theData[3] = (Uint32)(gci & 0xFFFFFFFF);
sendSignal(SUMA_REF, GSN_CONTINUEB, signal, 4, JBB);
return;
}
@@ -5399,10 +5399,10 @@ Suma::start_resend(Signal* signal, Uint3
signal->theData[0] = SumaContinueB::RESEND_BUCKET;
signal->theData[1] = buck;
- signal->theData[2] = min >> 32;
+ signal->theData[2] = (Uint32)(min >> 32);
signal->theData[3] = 0;
signal->theData[4] = 0;
- signal->theData[5] = min & 0xFFFFFFFF;
+ signal->theData[5] = (Uint32)(min & 0xFFFFFFFF);
signal->theData[6] = 0;
sendSignal(reference(), GSN_CONTINUEB, signal, 7, JBB);
@@ -5489,8 +5489,8 @@ Suma::resend_bucket(Signal* signal, Uint
if(sz == 0)
{
SubGcpCompleteRep * rep = (SubGcpCompleteRep*)signal->getDataPtrSend();
- rep->gci_hi = last_gci >> 32;
- rep->gci_lo = last_gci & 0xFFFFFFFF;
+ rep->gci_hi = (Uint32)(last_gci >> 32);
+ rep->gci_lo = (Uint32)(last_gci & 0xFFFFFFFF);
rep->flags = (m_missing_data)
? SubGcpCompleteRep::MISSING_DATA
: 0;
@@ -5550,8 +5550,8 @@ Suma::resend_bucket(Signal* signal, Uint
table_version_major(schemaVersion))
{
SubTableData * data = (SubTableData*)signal->getDataPtrSend();//trg;
- data->gci_hi = last_gci >> 32;
- data->gci_lo = last_gci & 0xFFFFFFFF;
+ data->gci_hi = (Uint32)(last_gci >> 32);
+ data->gci_lo = (Uint32)(last_gci & 0xFFFFFFFF);
data->tableId = table;
data->requestInfo = 0;
SubTableData::setOperation(data->requestInfo, event);
@@ -5602,11 +5602,11 @@ next:
signal->theData[0] = SumaContinueB::RESEND_BUCKET;
signal->theData[1] = buck;
- signal->theData[2] = min_gci >> 32;
+ signal->theData[2] = (Uint32)(min_gci >> 32);
signal->theData[3] = pos;
- signal->theData[4] = last_gci >> 32;
- signal->theData[5] = min_gci & 0xFFFFFFFF;
- signal->theData[6] = last_gci & 0xFFFFFFFF;
+ signal->theData[4] = (Uint32)(last_gci >> 32);
+ signal->theData[5] = (Uint32)(min_gci & 0xFFFFFFFF);
+ signal->theData[6] = (Uint32)(last_gci & 0xFFFFFFFF);
if(!delay)
sendSignal(SUMA_REF, GSN_CONTINUEB, signal, 7, JBB);
else
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.hpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-10-08 08:28:04 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-10-08 14:24:20 +0000
@@ -146,7 +146,7 @@ public:
typedef Ptr<Subscriber> SubscriberPtr;
struct Table;
- friend class Table;
+ friend struct Table;
typedef Ptr<Table> TablePtr;
struct SyncRecord {
=== modified file 'storage/ndb/src/kernel/blocks/tsman.cpp'
--- a/storage/ndb/src/kernel/blocks/tsman.cpp 2008-10-08 05:24:07 +0000
+++ b/storage/ndb/src/kernel/blocks/tsman.cpp 2008-10-08 14:25:11 +0000
@@ -769,8 +769,8 @@ Tsman::open_file(Signal* signal,
*/
pages = 1 + extent_pages + data_pages;
Uint64 bytes = pages * File_formats::NDB_PAGE_SIZE;
- hi = bytes >> 32;
- lo = bytes & 0xFFFFFFFF;
+ hi = (Uint32)(bytes >> 32);
+ lo = (Uint32)(bytes & 0xFFFFFFFF);
req->file_size_hi = hi;
req->file_size_lo = lo;
=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2008-09-30 17:09:29 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2008-10-08 14:19:37 +0000
@@ -66,7 +66,7 @@
} while (0)
#define V(x) " " << #x << ":" << (x)
#else
-#define D(x)
+#define D(x) do { } while(0)
#undef V
#endif
=== modified file 'storage/ndb/src/kernel/vm/pc.hpp'
--- a/storage/ndb/src/kernel/vm/pc.hpp 2008-10-08 08:32:37 +0000
+++ b/storage/ndb/src/kernel/vm/pc.hpp 2008-10-08 14:18:28 +0000
@@ -196,7 +196,7 @@
progError(__LINE__, NDBD_EXIT_NDBASSERT, __FILE__); \
}
#else
-#define ndbassert(check)
+#define ndbassert(check) do { } while(0)
#endif
#define ndbrequireErr(check, error) \
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2008-10-07 06:47:09 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2008-10-08 14:31:38 +0000
@@ -1358,7 +1358,7 @@ int MgmtSrvr::restartNodes(const Vector<
*stopCount = nodes.count();
// start up the nodes again
- int waitTime = 12000;
+ NDB_TICKS waitTime = 12000;
NDB_TICKS maxTime = NdbTick_CurrentMillisecond() + waitTime;
for (unsigned i = 0; i < node_ids.size(); i++)
{
@@ -1441,7 +1441,7 @@ int MgmtSrvr::restartDB(bool nostart, bo
* Here all nodes were correctly stopped,
* so we wait for all nodes to be contactable
*/
- int waitTime = 12000;
+ NDB_TICKS waitTime = 12000;
NodeId nodeId = 0;
NDB_TICKS maxTime = NdbTick_CurrentMillisecond() + waitTime;
=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2008-10-08 02:08:39 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2008-10-08 14:34:13 +0000
@@ -6314,7 +6314,7 @@ NdbRecord::Attr::get_mysqld_bitfield(con
memcpy(dst_buffer, &small_bits, 4);
if (maxSize > 4)
{
- small_bits= bits >> 32;
+ small_bits= (Uint32)(bits >> 32);
memcpy(dst_buffer+4, &small_bits, 4);
}
}
@@ -6340,7 +6340,7 @@ NdbRecord::Attr::put_mysqld_bitfield(cha
dst_ptr+= remaining_bits/8;
while (remaining_bits >= 8)
{
- *--dst_ptr= bits & 0xff;
+ *--dst_ptr= (char)(bits & 0xff);
bits>>= 8;
remaining_bits-= 8;
}
@@ -6601,8 +6601,8 @@ NdbDictInterface::create_file(const NdbF
f.FileType = file.m_type;
f.FilegroupId = group.m_id;
f.FilegroupVersion = group.m_version;
- f.FileSizeHi = (file.m_size >> 32);
- f.FileSizeLo = (file.m_size & 0xFFFFFFFF);
+ f.FileSizeHi = (Uint32)(file.m_size >> 32);
+ f.FileSizeLo = (Uint32)(file.m_size & 0xFFFFFFFF);
SimpleProperties::UnpackStatus s;
s = SimpleProperties::pack(w,
=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2008-10-04 18:53:48 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2008-10-08 14:33:17 +0000
@@ -2396,8 +2396,8 @@ NdbEventBuffer::completeClusterFailed()
Uint32 cnt = tmp->m_gcp_complete_rep_count;
SubGcpCompleteRep rep;
- rep.gci_hi= gci >> 32;
- rep.gci_lo= gci & 0xFFFFFFFF;
+ rep.gci_hi= (Uint32)(gci >> 32);
+ rep.gci_lo= (Uint32)(gci & 0xFFFFFFFF);
rep.gcp_complete_rep_count= cnt;
rep.flags = 0;
execSUB_GCP_COMPLETE_REP(&rep, SubGcpCompleteRep::SignalLength);
@@ -3506,10 +3506,10 @@ send_report:
data[1]= m_total_alloc-m_free_data_sz;
data[2]= m_total_alloc;
data[3]= 0;
- data[4]= apply_gci & ~(Uint32)0;
- data[5]= apply_gci >> 32;
- data[6]= latest_gci & ~(Uint32)0;
- data[7]= latest_gci >> 32;
+ data[4]= (Uint32)(apply_gci & ~(Uint32)0);
+ data[5]= (Uint32)(apply_gci >> 32);
+ data[6]= (Uint32)(latest_gci & ~(Uint32)0);
+ data[7]= (Uint32)(latest_gci >> 32);
Ndb_internal::send_event_report(m_ndb, data,8);
#ifdef VM_TRACE
assert(m_total_alloc >= m_free_data_sz);
=== modified file 'storage/ndb/test/ndbapi/flexAsynch.cpp'
--- a/storage/ndb/test/ndbapi/flexAsynch.cpp 2008-10-08 08:35:12 +0000
+++ b/storage/ndb/test/ndbapi/flexAsynch.cpp 2008-10-08 14:32:26 +0000
@@ -534,7 +534,6 @@ static
bool
executeThread(ThreadNdb* pThread,
StartType aType, Ndb* aNdbObject, unsigned int threadBase) {
- int i, j, k;
NdbConnection* tConArray[1024];
unsigned int tBase;
unsigned int tBase2;
@@ -543,14 +542,14 @@ executeThread(ThreadNdb* pThread,
for (unsigned int ex= 0; ex < (1 + extraLoops); ex++)
{
- for (i = 0; i < tNoOfTransactions; i++) {
+ for (unsigned int i = 0; i < tNoOfTransactions; i++) {
if (tLocal == false) {
tBase = i * tNoOfParallelTrans * tNoOfOpsPerTrans;
} else {
tBase = i * tNoOfParallelTrans * MAX_SEEK;
}//if
START_REAL_TIME;
- for (j = 0; j < tNoOfParallelTrans; j++) {
+ for (unsigned int j = 0; j < tNoOfParallelTrans; j++) {
if (tLocal == false) {
tBase2 = tBase + (j * tNoOfOpsPerTrans);
} else {
@@ -574,7 +573,7 @@ executeThread(ThreadNdb* pThread,
return false;
}//if
- for (k = 0; k < tNoOfOpsPerTrans; k++) {
+ for (unsigned int k = 0; k < tNoOfOpsPerTrans; k++) {
//-------------------------------------------------------
// Define the operation, but do not execute it yet.
//-------------------------------------------------------
@@ -597,7 +596,7 @@ executeThread(ThreadNdb* pThread,
int TlocalComp = aNdbObject->pollNdb(3000, 0);
Tcomp += TlocalComp;
}//while
- for (j = 0 ; j < tNoOfParallelTrans ; j++) {
+ for (unsigned int j = 0 ; j < tNoOfParallelTrans ; j++) {
aNdbObject->closeTransaction(tConArray[j]);
}//for
}//for
=== modified file 'storage/ndb/test/ndbapi/flexBench.cpp'
--- a/storage/ndb/test/ndbapi/flexBench.cpp 2008-10-08 08:35:12 +0000
+++ b/storage/ndb/test/ndbapi/flexBench.cpp 2008-10-08 14:26:58 +0000
@@ -771,7 +771,7 @@ static void* flexBenchThread(void* pArg)
// Calculate offset value before going into the next loop
nRefOpOffset = tAttributeSize*tNoOfAttributes*(ops-1) ;
for(Uint32 a = 0 ; a < tNoOfAttributes ; a++)
- for(Uint32 b= 0; b<tAttributeSize; b++)
+ for(int b= 0; b<tAttributeSize; b++)
attrRefValue[nRefOpOffset + tAttributeSize*a + b] =
(int)(threadBase + ops + a) ;
}
=== modified file 'storage/ndb/test/ndbapi/testOIBasic.cpp'
--- a/storage/ndb/test/ndbapi/testOIBasic.cpp 2008-10-07 05:38:01 +0000
+++ b/storage/ndb/test/ndbapi/testOIBasic.cpp 2008-10-08 14:26:16 +0000
@@ -723,6 +723,7 @@ Col::wellformed(const void* addr) const
const char* src = (const char*)addr;
uint len = m_bytelength;
int not_used;
+ (void)not_used; /* squash warning when assert is #defined to nothing */
assert((*cs->cset->well_formed_len)(cs, src, src + len, 0xffff, ¬_used) == len);
}
break;
@@ -733,6 +734,7 @@ Col::wellformed(const void* addr) const
const char* ssrc = (const char*)src;
uint len = src[0];
int not_used;
+ (void)not_used; /* squash warning when assert is #defined to nothing */
assert(len <= m_bytelength);
assert((*cs->cset->well_formed_len)(cs, ssrc + 1, ssrc + 1 + len, 0xffff, ¬_used) == len);
}
@@ -744,6 +746,7 @@ Col::wellformed(const void* addr) const
const char* ssrc = (const char*)src;
uint len = src[0] + (src[1] << 8);
int not_used;
+ (void)not_used; /* squash warning when assert is #defined to nothing */
assert(len <= m_bytelength);
assert((*cs->cset->well_formed_len)(cs, ssrc + 2, ssrc + 2 + len, 0xffff, ¬_used) == len);
}
=== modified file 'storage/ndb/tools/restore/Restore.hpp'
--- a/storage/ndb/tools/restore/Restore.hpp 2008-10-08 08:54:11 +0000
+++ b/storage/ndb/tools/restore/Restore.hpp 2008-10-08 13:42:33 +0000
@@ -52,7 +52,7 @@ typedef void* (*AttrConvertFunc)(const
//class AttributeDesc;
struct AttributeDesc;
struct AttributeData;
-struct AttributeS;
+class AttributeS;
struct AttributeData {
bool null;
@@ -82,7 +82,7 @@ struct AttributeDesc {
friend class TableS;
friend class RestoreDataIterator;
friend class RestoreMetaData;
- friend struct AttributeS;
+ friend class AttributeS;
Uint32 size; // bits
Uint32 arraySize;
Uint32 attrId;
| Thread |
|---|
| • bzr push into mysql-5.1 branch (stewart:2957 to 2986) | Stewart Smith | 8 Oct |