compile warning fixes

mysql-test/ndb/ndbcluster.sh:
  corrected shell test syntax
This commit is contained in:
unknown 2004-10-20 13:42:41 +00:00
parent 2da1cbd97d
commit e4a86f3237
28 changed files with 114 additions and 90 deletions

View file

@ -205,7 +205,7 @@ if [ -f "$fs_ndb/$pidfile" ] ; then
fi
done
kill_pids=$new_kill_pid
if [ "$kill_pids" == "" ] ; then
if [ -z "$kill_pids" ] ; then
break
fi
sleep 1

View file

@ -38,7 +38,7 @@
offsetof(x, l) }
#define DTIBREAK(x) \
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0 }
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
class DictTabInfo {
/**

View file

@ -28,6 +28,8 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
int lockfd = -1, logfd = -1, n;
char buf[64];
(void)flags; // remove warning for unused parameter
/* Check that we have write access to lock file */
assert(lockfile != NULL);
lockfd = open(lockfile, O_CREAT|O_RDWR, 0644);

View file

@ -42,6 +42,7 @@ void* NdbMem_Allocate(size_t size)
void* NdbMem_AllocateAlign(size_t size, size_t alignment)
{
(void)alignment; // remove warning for unused parameter
/*
return (void*)memalign(alignment, size);
TEMP fix

View file

@ -42,6 +42,8 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
int result;
pthread_attr_t thread_attr;
(void)thread_prio; // remove warning for unused parameter
if (p_thread_func == NULL)
return 0;
@ -109,6 +111,7 @@ int NdbThread_SetConcurrencyLevel(int level)
#ifdef USE_PTHREAD_EXTRAS
return pthread_setconcurrency(level);
#else
(void)level; // remove warning for unused parameter
return 0;
#endif
}

View file

@ -362,7 +362,7 @@ TCP_Transporter::doReceive() {
// Select-function must return the socket for read
// before this method is called
// It reads the external TCP/IP interface once
int size = receiveBuffer.sizeOfBuffer - receiveBuffer.sizeOfData;
Uint32 size = receiveBuffer.sizeOfBuffer - receiveBuffer.sizeOfData;
if(size > 0){
const int nBytesRead = recv(theSocket,
receiveBuffer.insertPtr,

View file

@ -32,7 +32,7 @@ Transporter::Transporter(TransporterRegistry &t_reg,
NodeId rNodeId,
int _byteorder,
bool _compression, bool _checksum, bool _signalId)
: m_r_port(r_port), localNodeId(lNodeId), remoteNodeId(rNodeId),
: m_r_port(r_port), remoteNodeId(rNodeId), localNodeId(lNodeId),
isServer(lNodeId < rNodeId),
m_packer(_signalId, _checksum),
m_transporter_registry(t_reg)

View file

@ -293,7 +293,7 @@ SimpleProperties::Reader::printAll(NdbOut& ndbout){
break;
default:
ndbout << "Unknown type for key: " << getKey()
<< " type: " << getValueType() << endl;
<< " type: " << (Uint32)getValueType() << endl;
}
}
}

View file

@ -936,8 +936,9 @@ operator<<(NdbOut& ndbout, const TableS & table){
for (int j = 0; j < table.getNoOfAttributes(); j++)
{
const AttributeDesc * desc = table[j];
ndbout << desc->m_column->getName() << ": " << desc->m_column->getType();
ndbout << " key: " << desc->m_column->getPrimaryKey();
ndbout << desc->m_column->getName() << ": "
<< (Uint32) desc->m_column->getType();
ndbout << " key: " << (Uint32) desc->m_column->getPrimaryKey();
ndbout << " array: " << desc->arraySize;
ndbout << " size: " << desc->size << endl;
} // for

View file

@ -1087,10 +1087,10 @@ private:
void deleteLongKey(Signal* signal);
void removeFromPageArrayList(Signal* signal);
void insertPageArrayList(Signal* signal);
void checkPageArrayList(Signal* signal, char *);
void checkPageB4Insert(Uint32, char *);
void checkPageB4Remove(Uint32, char *);
void checkIndexInLongKeyPage(Uint32, char *);
void checkPageArrayList(Signal* signal, const char *);
void checkPageB4Insert(Uint32, const char *);
void checkPageB4Remove(Uint32, const char *);
void checkIndexInLongKeyPage(Uint32, const char *);
void printoutInfoAndShutdown(LongKeyPage *);
void releaseLongPage(Signal* signal);
void abortOperation(Signal* signal);

View file

@ -4051,7 +4051,7 @@ void Dbacc::deleteLongKey(Signal* signal)
}//Dbacc::deleteLongKey()
void Dbacc::checkIndexInLongKeyPage(Uint32 pageId, char *calledFrom) {
void Dbacc::checkIndexInLongKeyPage(Uint32 pageId, const char *calledFrom) {
Page8Ptr pagePtr;
LongKeyPage *page;
Uint32 indexNo;
@ -4206,7 +4206,7 @@ void Dbacc::insertPageArrayList(Signal* signal)
// --------------------------------------------------------------------------------- */
// Check the page array list.
// --------------------------------------------------------------------------------- */
void Dbacc::checkPageArrayList(Signal* signal, char *calledFrom)
void Dbacc::checkPageArrayList(Signal* signal, const char *calledFrom)
{
Page8Ptr pagePtr;
Uint32 pageArrayIndex;
@ -4251,7 +4251,7 @@ void Dbacc::checkPageArrayList(Signal* signal, char *calledFrom)
// --------------------------------------------------------------------------------- */
// Check the page to put into the pageArrayList.
// --------------------------------------------------------------------------------- */
void Dbacc::checkPageB4Insert(Uint32 pageId, char *calledFrom) {
void Dbacc::checkPageB4Insert(Uint32 pageId, const char *calledFrom) {
Page8Ptr pagePtr;
Uint32 pageArrayIndex;
LongKeyPage *page;
@ -4318,7 +4318,7 @@ void Dbacc::checkPageB4Insert(Uint32 pageId, char *calledFrom) {
// --------------------------------------------------------------------------------- */
// Check the page to remove from the pageArrayList.
// --------------------------------------------------------------------------------- */
void Dbacc::checkPageB4Remove(Uint32 pageId, char *calledFrom) {
void Dbacc::checkPageB4Remove(Uint32 pageId, const char *calledFrom) {
Page8Ptr pagePtr;
Uint32 pageArrayIndex;
Uint32 noOfOccurrence = 0;

View file

@ -1638,7 +1638,7 @@ void Dbdih::execSTART_PERMREQ(Signal* signal)
}//if
if (getNodeStatus(nodeId) != NodeRecord::DEAD){
ndbout << "nodeStatus in START_PERMREQ = "
<< getNodeStatus(nodeId) << endl;
<< (Uint32) getNodeStatus(nodeId) << endl;
ndbrequire(false);
}//if
@ -4268,7 +4268,7 @@ void Dbdih::failedNodeLcpHandling(Signal* signal, NodeRecordPtr failedNodePtr)
failedNodePtr.p->activeStatus = Sysfile::NS_NotActive_NotTakenOver;
break;
default:
ndbout << "activeStatus = " << failedNodePtr.p->activeStatus;
ndbout << "activeStatus = " << (Uint32) failedNodePtr.p->activeStatus;
ndbout << " at failure after NODE_FAILREP of node = ";
ndbout << failedNodePtr.i << endl;
ndbrequire(false);
@ -6198,7 +6198,8 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
if (primaryTableId == RNIL) {
if(fragmentNode == 0){
jam();
NGPtr.i = c_nextNodeGroup;
// needs to be fixed for single fragment tables
NGPtr.i = 0; //c_nextNodeGroup;
c_nextNodeGroup = (NGPtr.i + 1 == cnoOfNodeGroups ? 0 : NGPtr.i + 1);
} else if(! (fragmentNode < MAX_NDB_NODES)) {
jam();
@ -6255,20 +6256,22 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
//@todo use section writer
Uint32 count = 2;
Uint32 fragments[2 + 8*MAX_REPLICAS*MAX_NDB_NODES];
Uint32 next_replica_node[MAX_NDB_NODES];
memset(next_replica_node,0,sizeof(next_replica_node));
if (primaryTableId == RNIL) {
jam();
for(Uint32 fragNo = 0; fragNo<noOfFragments; fragNo++){
jam();
ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
Uint32 ind = NGPtr.p->nextReplicaNode;
Uint32 ind = next_replica_node[NGPtr.i];
const Uint32 max = NGPtr.p->nodeCount;
//-------------------------------------------------------------------
// We make an extra step to ensure that the primary replicas are
// spread among the nodes.
//-------------------------------------------------------------------
NGPtr.p->nextReplicaNode = (ind + 1 >= max ? 0 : ind + 1);
next_replica_node[NGPtr.i] = (ind + 1 >= max ? 0 : ind + 1);
for(Uint32 replicaNo = 0; replicaNo<noOfReplicas; replicaNo++){
jam();
@ -7127,7 +7130,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
jam();
#ifdef VM_TRACE
ndbout << "System crash due to GCP Stop in state = ";
ndbout << cgcpStatus << endl;
ndbout << (Uint32) cgcpStatus << endl;
#endif
crashSystemAtGcpStop(signal);
return;
@ -7141,7 +7144,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
jam();
#ifdef VM_TRACE
ndbout << "System crash due to GCP Stop in state = ";
ndbout << cgcpStatus << endl;
ndbout << (Uint32) cgcpStatus << endl;
#endif
crashSystemAtGcpStop(signal);
return;
@ -9074,7 +9077,7 @@ void Dbdih::checkTcCounterLab(Signal* signal)
{
CRASH_INSERTION(7009);
if (c_lcpState.lcpStatus != LCP_STATUS_IDLE) {
ndbout << "lcpStatus = " << c_lcpState.lcpStatus;
ndbout << "lcpStatus = " << (Uint32) c_lcpState.lcpStatus;
ndbout << "lcpStatusUpdatedPlace = " <<
c_lcpState.lcpStatusUpdatedPlace << endl;
ndbrequire(false);

View file

@ -353,11 +353,11 @@ operator<<(NdbOut& out, const Dbtup::Operationrec& op)
out << " [interpretedExec " << dec << op.interpretedExec << "]";
out << " [opSimple " << dec << op.opSimple << "]";
// state
out << " [tupleState " << dec << op.tupleState << "]";
out << " [transstate " << dec << op.transstate << "]";
out << " [tupleState " << dec << (Uint32) op.tupleState << "]";
out << " [transstate " << dec << (Uint32) op.transstate << "]";
out << " [inFragList " << dec << op.inFragList << "]";
out << " [inActiveOpList " << dec << op.inActiveOpList << "]";
out << " [undoLogged " << dec << op.undoLogged << "]";
out << " [undoLogged " << dec << (Uint32) op.undoLogged << "]";
// links
out << " [prevActiveOp " << hex << op.prevActiveOp << "]";
out << " [nextActiveOp " << hex << op.nextActiveOp << "]";

View file

@ -893,19 +893,19 @@ int Dbtup::handleReadReq(Signal* signal,
if (regOperPtr->interpretedExec != 1) {
jam();
Uint32 TnoOfDataRead = readAttributes(pagePtr,
Ttupheadoffset,
&cinBuffer[0],
regOperPtr->attrinbufLen,
dst,
dstLen,
false);
if (TnoOfDataRead != (Uint32)-1) {
int ret = readAttributes(pagePtr,
Ttupheadoffset,
&cinBuffer[0],
regOperPtr->attrinbufLen,
dst,
dstLen,
false);
if (ret != -1) {
/* ------------------------------------------------------------------------- */
// We have read all data into coutBuffer. Now send it to the API.
/* ------------------------------------------------------------------------- */
jam();
Uint32 TnoOfDataRead= (Uint32) ret;
regOperPtr->attroutbufLen = TnoOfDataRead;
sendReadAttrinfo(signal, TnoOfDataRead, regOperPtr);
return 0;
@ -1111,7 +1111,7 @@ Dbtup::updateStartLab(Signal* signal,
regOperPtr->pageOffset,
&cinBuffer[0],
regOperPtr->attrinbufLen);
if (retValue == (Uint32)-1) {
if (retValue == -1) {
tupkeyErrorLab(signal);
}//if
} else {
@ -1215,7 +1215,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
{
Operationrec * const regOperPtr = operPtr.p;
Uint32 RtotalLen;
Uint32 TnoDataRW;
int TnoDataRW;
Uint32 RinitReadLen = cinBuffer[0];
Uint32 RexecRegionLen = cinBuffer[1];
@ -1273,7 +1273,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
&dst[0],
dstLen,
false);
if (TnoDataRW != (Uint32)-1) {
if (TnoDataRW != -1) {
RattroutCounter = TnoDataRW;
RinstructionCounter += RinitReadLen;
} else {
@ -1300,7 +1300,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
RsubLen,
&coutBuffer[0],
sizeof(coutBuffer) / 4);
if (TnoDataRW != (Uint32)-1) {
if (TnoDataRW != -1) {
RinstructionCounter += RexecRegionLen;
RlogSize = TnoDataRW;
} else {
@ -1319,7 +1319,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
TupHeadOffset,
&cinBuffer[RinstructionCounter],
RfinalUpdateLen);
if (TnoDataRW != (Uint32)-1) {
if (TnoDataRW != -1) {
MEMCOPY_NO_WORDS(&clogMemBuffer[RlogSize],
&cinBuffer[RinstructionCounter],
RfinalUpdateLen);
@ -1347,7 +1347,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
&dst[RattroutCounter],
(dstLen - RattroutCounter),
false);
if (TnoDataRW != (Uint32)-1) {
if (TnoDataRW != -1) {
RattroutCounter += TnoDataRW;
} else {
jam();
@ -1480,14 +1480,13 @@ int Dbtup::interpreterNextLab(Signal* signal,
/* ---------------------------------------------------------------- */
{
Uint32 theAttrinfo = theInstruction;
Uint32 TnoDataRW;
TnoDataRW = readAttributes(pagePtr,
TupHeadOffset,
&theAttrinfo,
(Uint32)1,
&TregMemBuffer[theRegister],
(Uint32)3,
false);
int TnoDataRW= readAttributes(pagePtr,
TupHeadOffset,
&theAttrinfo,
(Uint32)1,
&TregMemBuffer[theRegister],
(Uint32)3,
false);
if (TnoDataRW == 2) {
/* ------------------------------------------------------------- */
// Two words read means that we get the instruction plus one 32
@ -1511,7 +1510,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
TregMemBuffer[theRegister] = 0;
TregMemBuffer[theRegister + 2] = 0;
TregMemBuffer[theRegister + 3] = 0;
} else if (TnoDataRW == (Uint32)-1) {
} else if (TnoDataRW == -1) {
jam();
tupkeyErrorLab(signal);
return -1;
@ -1564,12 +1563,11 @@ int Dbtup::interpreterNextLab(Signal* signal,
ah.setNULL();
Tlen = 1;
}//if
Uint32 TnoDataRW;
TnoDataRW = updateAttributes(pagePtr,
TupHeadOffset,
&TdataForUpdate[0],
Tlen);
if (TnoDataRW != (Uint32)-1) {
int TnoDataRW= updateAttributes(pagePtr,
TupHeadOffset,
&TdataForUpdate[0],
Tlen);
if (TnoDataRW != -1) {
/* --------------------------------------------------------- */
// Write the written data also into the log buffer so that it
// will be logged.

View file

@ -166,7 +166,7 @@ Dbtup::tuxReadAttrs(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tu
fragptr = fragptr_old;
operPtr = operPtr_old;
// done
if (ret == (Uint32)-1) {
if (ret == -1) {
ret = terrorCode ? (-(int)terrorCode) : -1;
}
return ret;
@ -206,7 +206,7 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
fragptr = fragptr_old;
operPtr = operPtr_old;
// done
if (ret != (Uint32)-1) {
if (ret != -1) {
// remove headers
Uint32 n = 0;
Uint32 i = 0;

View file

@ -156,12 +156,12 @@ Dbtup::setUpQueryRoutines(Tablerec* const regTabPtr)
// tabptr.p Table record pointer
/* ---------------------------------------------------------------- */
int Dbtup::readAttributes(Page* const pagePtr,
Uint32 tupHeadOffset,
const Uint32* inBuffer,
Uint32 inBufLen,
Uint32* outBuffer,
Uint32 maxRead,
bool xfrmFlag)
Uint32 tupHeadOffset,
const Uint32* inBuffer,
Uint32 inBufLen,
Uint32* outBuffer,
Uint32 maxRead,
bool xfrmFlag)
{
Tablerec* const regTabPtr = tabptr.p;
Uint32 numAttributes = regTabPtr->noOfAttr;
@ -198,7 +198,7 @@ int Dbtup::readAttributes(Page* const pagePtr,
attributeOffset)) {
continue;
} else {
return (Uint32)-1;
return -1;
}//if
} else if(attributeId & AttributeHeader::PSUEDO){
Uint32 sz = read_psuedo(attributeId,
@ -207,7 +207,7 @@ int Dbtup::readAttributes(Page* const pagePtr,
tOutBufIndex = tmpAttrBufIndex + 1 + sz;
} else {
terrorCode = ZATTRIBUTE_ID_ERROR;
return (Uint32)-1;
return -1;
}//if
}//while
return tOutBufIndex;
@ -256,11 +256,11 @@ int Dbtup::readAttributesWithoutHeader(Page* const pagePtr,
attributeOffset)) {
continue;
} else {
return (Uint32)-1;
return -1;
}//if
} else {
terrorCode = ZATTRIBUTE_ID_ERROR;
return (Uint32)-1;
return -1;
}//if
}//while
ndbrequire(attrBufIndex == inBufLen);
@ -678,12 +678,12 @@ int Dbtup::updateAttributes(Page* const pagePtr,
continue;
} else {
ljam();
return (Uint32)-1;
return -1;
}//if
} else {
ljam();
terrorCode = ZATTRIBUTE_ID_ERROR;
return (Uint32)-1;
return -1;
}//if
}//while
return 0;

View file

@ -38,9 +38,9 @@ void Ndbcntr::initRecords()
Ndbcntr::Ndbcntr(const class Configuration & conf):
SimulatedBlock(NDBCNTR, conf),
c_stopRec(* this),
c_missra(* this),
cnoWaitrep6(0),
cnoWaitrep7(0)
cnoWaitrep7(0),
c_missra(* this)
{
BLOCK_CONSTRUCTOR(Ndbcntr);

View file

@ -828,6 +828,8 @@ CommandInterpreter::executeShow(char* parameters)
case NDB_MGM_NODE_TYPE_UNKNOWN:
ndbout << "Error: Unknown Node Type" << endl;
return;
case NDB_MGM_NODE_TYPE_REP:
abort();
}
}
@ -1638,7 +1640,7 @@ CommandInterpreter::executeStartBackup(char* /*parameters*/)
if(tmp)
{
ndbout << tmp;
int id;
unsigned int id;
if(sscanf(tmp, "%*[^:]: Backup %d ", &id) == 1 && id == backupId){
count++;
}

View file

@ -647,6 +647,7 @@ versionCallback(int nodeId, int version, void * anyData, int errCode){
}
break;
case NDB_MGM_NODE_TYPE_UNKNOWN:
case NDB_MGM_NODE_TYPE_REP:
abort();
};

View file

@ -85,6 +85,9 @@ Config::printAllNameValuePairs(NdbOut &out,
MGM_REQUIRE(prop->get(n, &str_value));
out << str_value;
break;
case ConfigInfo::SECTION:
out << "SECTION";
break;
}
out << endl;
}

View file

@ -3559,7 +3559,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
{
unsigned c= 0;
p_db_hosts.get(str.c_str(),&c);
if (c+1 == (1 << (replicas-1))) // all nodes on same machine
if (c+1 == (1u << (replicas-1))) // all nodes on same machine
node_group_warning.append(".\n Host failure will "
"cause complete cluster shutdown.");
else if (c > 0)

View file

@ -42,7 +42,7 @@ InitConfigFileParser::~InitConfigFileParser() {
// Read Config File
//****************************************************************************
InitConfigFileParser::Context::Context(const ConfigInfo * info)
: m_configValues(1000, 20), m_userProperties(true) {
: m_userProperties(true), m_configValues(1000, 20) {
m_config = new Properties(true);
m_defaults = new Properties(true);
@ -349,6 +349,8 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
case ConfigInfo::STRING:
MGM_REQUIRE(ctx.m_currentSection->put(pname, value));
break;
case ConfigInfo::SECTION:
abort();
}
return true;
}

View file

@ -1252,8 +1252,9 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
Uint32 threshold = 0;
LogLevel::EventCategory cat;
for(unsigned i = 0; i<EventLogger::matrixSize; i++){
int i;
for(i = 0; (unsigned)i<EventLogger::matrixSize; i++){
if(EventLogger::matrix[i].eventType == eventType){
cat = EventLogger::matrix[i].eventCategory;
threshold = EventLogger::matrix[i].threshold;
@ -1266,7 +1267,6 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
Vector<NDB_SOCKET_TYPE> copy;
m_clients.lock();
int i;
for(i = m_clients.size() - 1; i >= 0; i--){
if(threshold <= m_clients[i].m_logLevel.getLogLevel(cat)){
if(m_clients[i].m_socket >= 0 &&
@ -1279,14 +1279,14 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
}
m_clients.unlock();
for(i = 0; (unsigned)i<copy.size(); i++){
for(i = 0; (unsigned)i < copy.size(); i++){
NDB_CLOSE_SOCKET(copy[i]);
}
if(copy.size()){
LogLevel tmp; tmp.clear();
m_clients.lock();
for(i = 0; i < m_clients.size(); i++){
for(i = 0; (unsigned)i < m_clients.size(); i++){
tmp.set_max(m_clients[i].m_logLevel);
}
m_clients.unlock();

View file

@ -1440,11 +1440,11 @@ NdbOut&
operator<<(NdbOut& out, const NdbBlob& blob)
{
ndbout << dec << "o=" << blob.getOperationType();
ndbout << dec << " s=" << blob.theState;
ndbout << dec << " s=" << (Uint32) blob.theState;
ndbout << dec << " n=" << blob.theNullFlag;;
ndbout << dec << " l=" << blob.theLength;
ndbout << dec << " p=" << blob.thePos;
ndbout << dec << " u=" << blob.theHeadInlineUpdateFlag;
ndbout << dec << " u=" << (Uint32) blob.theHeadInlineUpdateFlag;
return out;
}
#endif

View file

@ -730,7 +730,8 @@ NdbConnection::doSend()
theNdb->insert_completed_list(this);
DBUG_RETURN(0);
default:
ndbout << "Inconsistent theSendStatus = " << theSendStatus << endl;
ndbout << "Inconsistent theSendStatus = "
<< (Uint32) theSendStatus << endl;
abort();
break;
}//switch
@ -1643,6 +1644,10 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
setOperationErrorCodeAbort(4115);
tOp = NULL;
break;
case NdbOperation::NotDefined:
case NdbOperation::NotDefined2:
assert();
break;
}//if
}//while
theReleaseOnClose = true;
@ -1924,14 +1929,14 @@ NdbConnection::printState()
CASE(Connected);
CASE(DisConnecting);
CASE(ConnectFailure);
default: ndbout << theStatus;
default: ndbout << (Uint32) theStatus;
}
switch (theListState) {
CASE(NotInList);
CASE(InPreparedList);
CASE(InSendList);
CASE(InCompletedList);
default: ndbout << theListState;
default: ndbout << (Uint32) theListState;
}
switch (theSendStatus) {
CASE(NotInit);
@ -1944,7 +1949,7 @@ NdbConnection::printState()
CASE(sendTC_ROLLBACK);
CASE(sendTC_COMMIT);
CASE(sendTC_OP);
default: ndbout << theSendStatus;
default: ndbout << (Uint32) theSendStatus;
}
switch (theCommitStatus) {
CASE(NotStarted);
@ -1952,14 +1957,14 @@ NdbConnection::printState()
CASE(Committed);
CASE(Aborted);
CASE(NeedAbort);
default: ndbout << theCommitStatus;
default: ndbout << (Uint32) theCommitStatus;
}
switch (theCompletionStatus) {
CASE(NotCompleted);
CASE(CompletedSuccess);
CASE(CompletedFailure);
CASE(DefinitionFailure);
default: ndbout << theCompletionStatus;
default: ndbout << (Uint32) theCompletionStatus;
}
ndbout << endl;
}

View file

@ -148,6 +148,9 @@ NdbColumnImpl::init(Type t)
m_length = 4;
m_cs = default_cs;
break;
case Undefined:
assert();
break;
}
m_pk = false;
m_nullable = false;

View file

@ -92,7 +92,7 @@ NdbReceiver::getValue(const NdbColumnImpl* tAttrInfo, char * user_dst_ptr){
return 0;
}
#define KEY_ATTR_ID (~0)
#define KEY_ATTR_ID (~(Uint32)0)
void
NdbReceiver::calculate_batch_size(Uint32 key_size,

View file

@ -33,7 +33,7 @@ Ndb::checkFailedNode()
DBUG_PRINT("enter", ("theNoOfDBnodes: %d", theNoOfDBnodes));
DBUG_ASSERT(theNoOfDBnodes < MAX_NDB_NODES);
for (int i = 0; i < theNoOfDBnodes; i++){
for (Uint32 i = 0; i < theNoOfDBnodes; i++){
const NodeId node_id = theDBnodes[i];
DBUG_PRINT("info", ("i: %d, node_id: %d", i, node_id));