mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
compile warning fixes
mysql-test/ndb/ndbcluster.sh: corrected shell test syntax
This commit is contained in:
@@ -205,7 +205,7 @@ if [ -f "$fs_ndb/$pidfile" ] ; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
kill_pids=$new_kill_pid
|
kill_pids=$new_kill_pid
|
||||||
if [ "$kill_pids" == "" ] ; then
|
if [ -z "$kill_pids" ] ; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
offsetof(x, l) }
|
offsetof(x, l) }
|
||||||
|
|
||||||
#define DTIBREAK(x) \
|
#define DTIBREAK(x) \
|
||||||
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0 }
|
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
|
||||||
|
|
||||||
class DictTabInfo {
|
class DictTabInfo {
|
||||||
/**
|
/**
|
||||||
|
@@ -28,6 +28,8 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
|
|||||||
int lockfd = -1, logfd = -1, n;
|
int lockfd = -1, logfd = -1, n;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
|
(void)flags; // remove warning for unused parameter
|
||||||
|
|
||||||
/* Check that we have write access to lock file */
|
/* Check that we have write access to lock file */
|
||||||
assert(lockfile != NULL);
|
assert(lockfile != NULL);
|
||||||
lockfd = open(lockfile, O_CREAT|O_RDWR, 0644);
|
lockfd = open(lockfile, O_CREAT|O_RDWR, 0644);
|
||||||
|
@@ -42,6 +42,7 @@ void* NdbMem_Allocate(size_t size)
|
|||||||
|
|
||||||
void* NdbMem_AllocateAlign(size_t size, size_t alignment)
|
void* NdbMem_AllocateAlign(size_t size, size_t alignment)
|
||||||
{
|
{
|
||||||
|
(void)alignment; // remove warning for unused parameter
|
||||||
/*
|
/*
|
||||||
return (void*)memalign(alignment, size);
|
return (void*)memalign(alignment, size);
|
||||||
TEMP fix
|
TEMP fix
|
||||||
|
@@ -42,6 +42,8 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
|
|||||||
int result;
|
int result;
|
||||||
pthread_attr_t thread_attr;
|
pthread_attr_t thread_attr;
|
||||||
|
|
||||||
|
(void)thread_prio; // remove warning for unused parameter
|
||||||
|
|
||||||
if (p_thread_func == NULL)
|
if (p_thread_func == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -109,6 +111,7 @@ int NdbThread_SetConcurrencyLevel(int level)
|
|||||||
#ifdef USE_PTHREAD_EXTRAS
|
#ifdef USE_PTHREAD_EXTRAS
|
||||||
return pthread_setconcurrency(level);
|
return pthread_setconcurrency(level);
|
||||||
#else
|
#else
|
||||||
|
(void)level; // remove warning for unused parameter
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -362,7 +362,7 @@ TCP_Transporter::doReceive() {
|
|||||||
// Select-function must return the socket for read
|
// Select-function must return the socket for read
|
||||||
// before this method is called
|
// before this method is called
|
||||||
// It reads the external TCP/IP interface once
|
// It reads the external TCP/IP interface once
|
||||||
int size = receiveBuffer.sizeOfBuffer - receiveBuffer.sizeOfData;
|
Uint32 size = receiveBuffer.sizeOfBuffer - receiveBuffer.sizeOfData;
|
||||||
if(size > 0){
|
if(size > 0){
|
||||||
const int nBytesRead = recv(theSocket,
|
const int nBytesRead = recv(theSocket,
|
||||||
receiveBuffer.insertPtr,
|
receiveBuffer.insertPtr,
|
||||||
|
@@ -32,7 +32,7 @@ Transporter::Transporter(TransporterRegistry &t_reg,
|
|||||||
NodeId rNodeId,
|
NodeId rNodeId,
|
||||||
int _byteorder,
|
int _byteorder,
|
||||||
bool _compression, bool _checksum, bool _signalId)
|
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),
|
isServer(lNodeId < rNodeId),
|
||||||
m_packer(_signalId, _checksum),
|
m_packer(_signalId, _checksum),
|
||||||
m_transporter_registry(t_reg)
|
m_transporter_registry(t_reg)
|
||||||
|
@@ -293,7 +293,7 @@ SimpleProperties::Reader::printAll(NdbOut& ndbout){
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ndbout << "Unknown type for key: " << getKey()
|
ndbout << "Unknown type for key: " << getKey()
|
||||||
<< " type: " << getValueType() << endl;
|
<< " type: " << (Uint32)getValueType() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -936,8 +936,9 @@ operator<<(NdbOut& ndbout, const TableS & table){
|
|||||||
for (int j = 0; j < table.getNoOfAttributes(); j++)
|
for (int j = 0; j < table.getNoOfAttributes(); j++)
|
||||||
{
|
{
|
||||||
const AttributeDesc * desc = table[j];
|
const AttributeDesc * desc = table[j];
|
||||||
ndbout << desc->m_column->getName() << ": " << desc->m_column->getType();
|
ndbout << desc->m_column->getName() << ": "
|
||||||
ndbout << " key: " << desc->m_column->getPrimaryKey();
|
<< (Uint32) desc->m_column->getType();
|
||||||
|
ndbout << " key: " << (Uint32) desc->m_column->getPrimaryKey();
|
||||||
ndbout << " array: " << desc->arraySize;
|
ndbout << " array: " << desc->arraySize;
|
||||||
ndbout << " size: " << desc->size << endl;
|
ndbout << " size: " << desc->size << endl;
|
||||||
} // for
|
} // for
|
||||||
|
@@ -1087,10 +1087,10 @@ private:
|
|||||||
void deleteLongKey(Signal* signal);
|
void deleteLongKey(Signal* signal);
|
||||||
void removeFromPageArrayList(Signal* signal);
|
void removeFromPageArrayList(Signal* signal);
|
||||||
void insertPageArrayList(Signal* signal);
|
void insertPageArrayList(Signal* signal);
|
||||||
void checkPageArrayList(Signal* signal, char *);
|
void checkPageArrayList(Signal* signal, const char *);
|
||||||
void checkPageB4Insert(Uint32, char *);
|
void checkPageB4Insert(Uint32, const char *);
|
||||||
void checkPageB4Remove(Uint32, char *);
|
void checkPageB4Remove(Uint32, const char *);
|
||||||
void checkIndexInLongKeyPage(Uint32, char *);
|
void checkIndexInLongKeyPage(Uint32, const char *);
|
||||||
void printoutInfoAndShutdown(LongKeyPage *);
|
void printoutInfoAndShutdown(LongKeyPage *);
|
||||||
void releaseLongPage(Signal* signal);
|
void releaseLongPage(Signal* signal);
|
||||||
void abortOperation(Signal* signal);
|
void abortOperation(Signal* signal);
|
||||||
|
@@ -4051,7 +4051,7 @@ void Dbacc::deleteLongKey(Signal* signal)
|
|||||||
}//Dbacc::deleteLongKey()
|
}//Dbacc::deleteLongKey()
|
||||||
|
|
||||||
|
|
||||||
void Dbacc::checkIndexInLongKeyPage(Uint32 pageId, char *calledFrom) {
|
void Dbacc::checkIndexInLongKeyPage(Uint32 pageId, const char *calledFrom) {
|
||||||
Page8Ptr pagePtr;
|
Page8Ptr pagePtr;
|
||||||
LongKeyPage *page;
|
LongKeyPage *page;
|
||||||
Uint32 indexNo;
|
Uint32 indexNo;
|
||||||
@@ -4206,7 +4206,7 @@ void Dbacc::insertPageArrayList(Signal* signal)
|
|||||||
// --------------------------------------------------------------------------------- */
|
// --------------------------------------------------------------------------------- */
|
||||||
// Check the page array list.
|
// Check the page array list.
|
||||||
// --------------------------------------------------------------------------------- */
|
// --------------------------------------------------------------------------------- */
|
||||||
void Dbacc::checkPageArrayList(Signal* signal, char *calledFrom)
|
void Dbacc::checkPageArrayList(Signal* signal, const char *calledFrom)
|
||||||
{
|
{
|
||||||
Page8Ptr pagePtr;
|
Page8Ptr pagePtr;
|
||||||
Uint32 pageArrayIndex;
|
Uint32 pageArrayIndex;
|
||||||
@@ -4251,7 +4251,7 @@ void Dbacc::checkPageArrayList(Signal* signal, char *calledFrom)
|
|||||||
// --------------------------------------------------------------------------------- */
|
// --------------------------------------------------------------------------------- */
|
||||||
// Check the page to put into the pageArrayList.
|
// 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;
|
Page8Ptr pagePtr;
|
||||||
Uint32 pageArrayIndex;
|
Uint32 pageArrayIndex;
|
||||||
LongKeyPage *page;
|
LongKeyPage *page;
|
||||||
@@ -4318,7 +4318,7 @@ void Dbacc::checkPageB4Insert(Uint32 pageId, char *calledFrom) {
|
|||||||
// --------------------------------------------------------------------------------- */
|
// --------------------------------------------------------------------------------- */
|
||||||
// Check the page to remove from the pageArrayList.
|
// 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;
|
Page8Ptr pagePtr;
|
||||||
Uint32 pageArrayIndex;
|
Uint32 pageArrayIndex;
|
||||||
Uint32 noOfOccurrence = 0;
|
Uint32 noOfOccurrence = 0;
|
||||||
|
@@ -1638,7 +1638,7 @@ void Dbdih::execSTART_PERMREQ(Signal* signal)
|
|||||||
}//if
|
}//if
|
||||||
if (getNodeStatus(nodeId) != NodeRecord::DEAD){
|
if (getNodeStatus(nodeId) != NodeRecord::DEAD){
|
||||||
ndbout << "nodeStatus in START_PERMREQ = "
|
ndbout << "nodeStatus in START_PERMREQ = "
|
||||||
<< getNodeStatus(nodeId) << endl;
|
<< (Uint32) getNodeStatus(nodeId) << endl;
|
||||||
ndbrequire(false);
|
ndbrequire(false);
|
||||||
}//if
|
}//if
|
||||||
|
|
||||||
@@ -4268,7 +4268,7 @@ void Dbdih::failedNodeLcpHandling(Signal* signal, NodeRecordPtr failedNodePtr)
|
|||||||
failedNodePtr.p->activeStatus = Sysfile::NS_NotActive_NotTakenOver;
|
failedNodePtr.p->activeStatus = Sysfile::NS_NotActive_NotTakenOver;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ndbout << "activeStatus = " << failedNodePtr.p->activeStatus;
|
ndbout << "activeStatus = " << (Uint32) failedNodePtr.p->activeStatus;
|
||||||
ndbout << " at failure after NODE_FAILREP of node = ";
|
ndbout << " at failure after NODE_FAILREP of node = ";
|
||||||
ndbout << failedNodePtr.i << endl;
|
ndbout << failedNodePtr.i << endl;
|
||||||
ndbrequire(false);
|
ndbrequire(false);
|
||||||
@@ -6198,7 +6198,8 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
|
|||||||
if (primaryTableId == RNIL) {
|
if (primaryTableId == RNIL) {
|
||||||
if(fragmentNode == 0){
|
if(fragmentNode == 0){
|
||||||
jam();
|
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);
|
c_nextNodeGroup = (NGPtr.i + 1 == cnoOfNodeGroups ? 0 : NGPtr.i + 1);
|
||||||
} else if(! (fragmentNode < MAX_NDB_NODES)) {
|
} else if(! (fragmentNode < MAX_NDB_NODES)) {
|
||||||
jam();
|
jam();
|
||||||
@@ -6255,20 +6256,22 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
|
|||||||
//@todo use section writer
|
//@todo use section writer
|
||||||
Uint32 count = 2;
|
Uint32 count = 2;
|
||||||
Uint32 fragments[2 + 8*MAX_REPLICAS*MAX_NDB_NODES];
|
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) {
|
if (primaryTableId == RNIL) {
|
||||||
jam();
|
jam();
|
||||||
for(Uint32 fragNo = 0; fragNo<noOfFragments; fragNo++){
|
for(Uint32 fragNo = 0; fragNo<noOfFragments; fragNo++){
|
||||||
jam();
|
jam();
|
||||||
ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
|
ptrCheckGuard(NGPtr, MAX_NDB_NODES, nodeGroupRecord);
|
||||||
|
|
||||||
Uint32 ind = NGPtr.p->nextReplicaNode;
|
Uint32 ind = next_replica_node[NGPtr.i];
|
||||||
const Uint32 max = NGPtr.p->nodeCount;
|
const Uint32 max = NGPtr.p->nodeCount;
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
// We make an extra step to ensure that the primary replicas are
|
// We make an extra step to ensure that the primary replicas are
|
||||||
// spread among the nodes.
|
// 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++){
|
for(Uint32 replicaNo = 0; replicaNo<noOfReplicas; replicaNo++){
|
||||||
jam();
|
jam();
|
||||||
@@ -7127,7 +7130,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
|
|||||||
jam();
|
jam();
|
||||||
#ifdef VM_TRACE
|
#ifdef VM_TRACE
|
||||||
ndbout << "System crash due to GCP Stop in state = ";
|
ndbout << "System crash due to GCP Stop in state = ";
|
||||||
ndbout << cgcpStatus << endl;
|
ndbout << (Uint32) cgcpStatus << endl;
|
||||||
#endif
|
#endif
|
||||||
crashSystemAtGcpStop(signal);
|
crashSystemAtGcpStop(signal);
|
||||||
return;
|
return;
|
||||||
@@ -7141,7 +7144,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
|
|||||||
jam();
|
jam();
|
||||||
#ifdef VM_TRACE
|
#ifdef VM_TRACE
|
||||||
ndbout << "System crash due to GCP Stop in state = ";
|
ndbout << "System crash due to GCP Stop in state = ";
|
||||||
ndbout << cgcpStatus << endl;
|
ndbout << (Uint32) cgcpStatus << endl;
|
||||||
#endif
|
#endif
|
||||||
crashSystemAtGcpStop(signal);
|
crashSystemAtGcpStop(signal);
|
||||||
return;
|
return;
|
||||||
@@ -9074,7 +9077,7 @@ void Dbdih::checkTcCounterLab(Signal* signal)
|
|||||||
{
|
{
|
||||||
CRASH_INSERTION(7009);
|
CRASH_INSERTION(7009);
|
||||||
if (c_lcpState.lcpStatus != LCP_STATUS_IDLE) {
|
if (c_lcpState.lcpStatus != LCP_STATUS_IDLE) {
|
||||||
ndbout << "lcpStatus = " << c_lcpState.lcpStatus;
|
ndbout << "lcpStatus = " << (Uint32) c_lcpState.lcpStatus;
|
||||||
ndbout << "lcpStatusUpdatedPlace = " <<
|
ndbout << "lcpStatusUpdatedPlace = " <<
|
||||||
c_lcpState.lcpStatusUpdatedPlace << endl;
|
c_lcpState.lcpStatusUpdatedPlace << endl;
|
||||||
ndbrequire(false);
|
ndbrequire(false);
|
||||||
|
@@ -353,11 +353,11 @@ operator<<(NdbOut& out, const Dbtup::Operationrec& op)
|
|||||||
out << " [interpretedExec " << dec << op.interpretedExec << "]";
|
out << " [interpretedExec " << dec << op.interpretedExec << "]";
|
||||||
out << " [opSimple " << dec << op.opSimple << "]";
|
out << " [opSimple " << dec << op.opSimple << "]";
|
||||||
// state
|
// state
|
||||||
out << " [tupleState " << dec << op.tupleState << "]";
|
out << " [tupleState " << dec << (Uint32) op.tupleState << "]";
|
||||||
out << " [transstate " << dec << op.transstate << "]";
|
out << " [transstate " << dec << (Uint32) op.transstate << "]";
|
||||||
out << " [inFragList " << dec << op.inFragList << "]";
|
out << " [inFragList " << dec << op.inFragList << "]";
|
||||||
out << " [inActiveOpList " << dec << op.inActiveOpList << "]";
|
out << " [inActiveOpList " << dec << op.inActiveOpList << "]";
|
||||||
out << " [undoLogged " << dec << op.undoLogged << "]";
|
out << " [undoLogged " << dec << (Uint32) op.undoLogged << "]";
|
||||||
// links
|
// links
|
||||||
out << " [prevActiveOp " << hex << op.prevActiveOp << "]";
|
out << " [prevActiveOp " << hex << op.prevActiveOp << "]";
|
||||||
out << " [nextActiveOp " << hex << op.nextActiveOp << "]";
|
out << " [nextActiveOp " << hex << op.nextActiveOp << "]";
|
||||||
|
@@ -893,19 +893,19 @@ int Dbtup::handleReadReq(Signal* signal,
|
|||||||
|
|
||||||
if (regOperPtr->interpretedExec != 1) {
|
if (regOperPtr->interpretedExec != 1) {
|
||||||
jam();
|
jam();
|
||||||
|
int ret = readAttributes(pagePtr,
|
||||||
Uint32 TnoOfDataRead = readAttributes(pagePtr,
|
|
||||||
Ttupheadoffset,
|
Ttupheadoffset,
|
||||||
&cinBuffer[0],
|
&cinBuffer[0],
|
||||||
regOperPtr->attrinbufLen,
|
regOperPtr->attrinbufLen,
|
||||||
dst,
|
dst,
|
||||||
dstLen,
|
dstLen,
|
||||||
false);
|
false);
|
||||||
if (TnoOfDataRead != (Uint32)-1) {
|
if (ret != -1) {
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
// We have read all data into coutBuffer. Now send it to the API.
|
// We have read all data into coutBuffer. Now send it to the API.
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
jam();
|
jam();
|
||||||
|
Uint32 TnoOfDataRead= (Uint32) ret;
|
||||||
regOperPtr->attroutbufLen = TnoOfDataRead;
|
regOperPtr->attroutbufLen = TnoOfDataRead;
|
||||||
sendReadAttrinfo(signal, TnoOfDataRead, regOperPtr);
|
sendReadAttrinfo(signal, TnoOfDataRead, regOperPtr);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1111,7 +1111,7 @@ Dbtup::updateStartLab(Signal* signal,
|
|||||||
regOperPtr->pageOffset,
|
regOperPtr->pageOffset,
|
||||||
&cinBuffer[0],
|
&cinBuffer[0],
|
||||||
regOperPtr->attrinbufLen);
|
regOperPtr->attrinbufLen);
|
||||||
if (retValue == (Uint32)-1) {
|
if (retValue == -1) {
|
||||||
tupkeyErrorLab(signal);
|
tupkeyErrorLab(signal);
|
||||||
}//if
|
}//if
|
||||||
} else {
|
} else {
|
||||||
@@ -1215,7 +1215,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
|
|||||||
{
|
{
|
||||||
Operationrec * const regOperPtr = operPtr.p;
|
Operationrec * const regOperPtr = operPtr.p;
|
||||||
Uint32 RtotalLen;
|
Uint32 RtotalLen;
|
||||||
Uint32 TnoDataRW;
|
int TnoDataRW;
|
||||||
|
|
||||||
Uint32 RinitReadLen = cinBuffer[0];
|
Uint32 RinitReadLen = cinBuffer[0];
|
||||||
Uint32 RexecRegionLen = cinBuffer[1];
|
Uint32 RexecRegionLen = cinBuffer[1];
|
||||||
@@ -1273,7 +1273,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
|
|||||||
&dst[0],
|
&dst[0],
|
||||||
dstLen,
|
dstLen,
|
||||||
false);
|
false);
|
||||||
if (TnoDataRW != (Uint32)-1) {
|
if (TnoDataRW != -1) {
|
||||||
RattroutCounter = TnoDataRW;
|
RattroutCounter = TnoDataRW;
|
||||||
RinstructionCounter += RinitReadLen;
|
RinstructionCounter += RinitReadLen;
|
||||||
} else {
|
} else {
|
||||||
@@ -1300,7 +1300,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
|
|||||||
RsubLen,
|
RsubLen,
|
||||||
&coutBuffer[0],
|
&coutBuffer[0],
|
||||||
sizeof(coutBuffer) / 4);
|
sizeof(coutBuffer) / 4);
|
||||||
if (TnoDataRW != (Uint32)-1) {
|
if (TnoDataRW != -1) {
|
||||||
RinstructionCounter += RexecRegionLen;
|
RinstructionCounter += RexecRegionLen;
|
||||||
RlogSize = TnoDataRW;
|
RlogSize = TnoDataRW;
|
||||||
} else {
|
} else {
|
||||||
@@ -1319,7 +1319,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
|
|||||||
TupHeadOffset,
|
TupHeadOffset,
|
||||||
&cinBuffer[RinstructionCounter],
|
&cinBuffer[RinstructionCounter],
|
||||||
RfinalUpdateLen);
|
RfinalUpdateLen);
|
||||||
if (TnoDataRW != (Uint32)-1) {
|
if (TnoDataRW != -1) {
|
||||||
MEMCOPY_NO_WORDS(&clogMemBuffer[RlogSize],
|
MEMCOPY_NO_WORDS(&clogMemBuffer[RlogSize],
|
||||||
&cinBuffer[RinstructionCounter],
|
&cinBuffer[RinstructionCounter],
|
||||||
RfinalUpdateLen);
|
RfinalUpdateLen);
|
||||||
@@ -1347,7 +1347,7 @@ int Dbtup::interpreterStartLab(Signal* signal,
|
|||||||
&dst[RattroutCounter],
|
&dst[RattroutCounter],
|
||||||
(dstLen - RattroutCounter),
|
(dstLen - RattroutCounter),
|
||||||
false);
|
false);
|
||||||
if (TnoDataRW != (Uint32)-1) {
|
if (TnoDataRW != -1) {
|
||||||
RattroutCounter += TnoDataRW;
|
RattroutCounter += TnoDataRW;
|
||||||
} else {
|
} else {
|
||||||
jam();
|
jam();
|
||||||
@@ -1480,8 +1480,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
|
|||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
Uint32 theAttrinfo = theInstruction;
|
Uint32 theAttrinfo = theInstruction;
|
||||||
Uint32 TnoDataRW;
|
int TnoDataRW= readAttributes(pagePtr,
|
||||||
TnoDataRW = readAttributes(pagePtr,
|
|
||||||
TupHeadOffset,
|
TupHeadOffset,
|
||||||
&theAttrinfo,
|
&theAttrinfo,
|
||||||
(Uint32)1,
|
(Uint32)1,
|
||||||
@@ -1511,7 +1510,7 @@ int Dbtup::interpreterNextLab(Signal* signal,
|
|||||||
TregMemBuffer[theRegister] = 0;
|
TregMemBuffer[theRegister] = 0;
|
||||||
TregMemBuffer[theRegister + 2] = 0;
|
TregMemBuffer[theRegister + 2] = 0;
|
||||||
TregMemBuffer[theRegister + 3] = 0;
|
TregMemBuffer[theRegister + 3] = 0;
|
||||||
} else if (TnoDataRW == (Uint32)-1) {
|
} else if (TnoDataRW == -1) {
|
||||||
jam();
|
jam();
|
||||||
tupkeyErrorLab(signal);
|
tupkeyErrorLab(signal);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1564,12 +1563,11 @@ int Dbtup::interpreterNextLab(Signal* signal,
|
|||||||
ah.setNULL();
|
ah.setNULL();
|
||||||
Tlen = 1;
|
Tlen = 1;
|
||||||
}//if
|
}//if
|
||||||
Uint32 TnoDataRW;
|
int TnoDataRW= updateAttributes(pagePtr,
|
||||||
TnoDataRW = updateAttributes(pagePtr,
|
|
||||||
TupHeadOffset,
|
TupHeadOffset,
|
||||||
&TdataForUpdate[0],
|
&TdataForUpdate[0],
|
||||||
Tlen);
|
Tlen);
|
||||||
if (TnoDataRW != (Uint32)-1) {
|
if (TnoDataRW != -1) {
|
||||||
/* --------------------------------------------------------- */
|
/* --------------------------------------------------------- */
|
||||||
// Write the written data also into the log buffer so that it
|
// Write the written data also into the log buffer so that it
|
||||||
// will be logged.
|
// will be logged.
|
||||||
|
@@ -166,7 +166,7 @@ Dbtup::tuxReadAttrs(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tu
|
|||||||
fragptr = fragptr_old;
|
fragptr = fragptr_old;
|
||||||
operPtr = operPtr_old;
|
operPtr = operPtr_old;
|
||||||
// done
|
// done
|
||||||
if (ret == (Uint32)-1) {
|
if (ret == -1) {
|
||||||
ret = terrorCode ? (-(int)terrorCode) : -1;
|
ret = terrorCode ? (-(int)terrorCode) : -1;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -206,7 +206,7 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
|
|||||||
fragptr = fragptr_old;
|
fragptr = fragptr_old;
|
||||||
operPtr = operPtr_old;
|
operPtr = operPtr_old;
|
||||||
// done
|
// done
|
||||||
if (ret != (Uint32)-1) {
|
if (ret != -1) {
|
||||||
// remove headers
|
// remove headers
|
||||||
Uint32 n = 0;
|
Uint32 n = 0;
|
||||||
Uint32 i = 0;
|
Uint32 i = 0;
|
||||||
|
@@ -198,7 +198,7 @@ int Dbtup::readAttributes(Page* const pagePtr,
|
|||||||
attributeOffset)) {
|
attributeOffset)) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
} else if(attributeId & AttributeHeader::PSUEDO){
|
} else if(attributeId & AttributeHeader::PSUEDO){
|
||||||
Uint32 sz = read_psuedo(attributeId,
|
Uint32 sz = read_psuedo(attributeId,
|
||||||
@@ -207,7 +207,7 @@ int Dbtup::readAttributes(Page* const pagePtr,
|
|||||||
tOutBufIndex = tmpAttrBufIndex + 1 + sz;
|
tOutBufIndex = tmpAttrBufIndex + 1 + sz;
|
||||||
} else {
|
} else {
|
||||||
terrorCode = ZATTRIBUTE_ID_ERROR;
|
terrorCode = ZATTRIBUTE_ID_ERROR;
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
}//while
|
}//while
|
||||||
return tOutBufIndex;
|
return tOutBufIndex;
|
||||||
@@ -256,11 +256,11 @@ int Dbtup::readAttributesWithoutHeader(Page* const pagePtr,
|
|||||||
attributeOffset)) {
|
attributeOffset)) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
} else {
|
} else {
|
||||||
terrorCode = ZATTRIBUTE_ID_ERROR;
|
terrorCode = ZATTRIBUTE_ID_ERROR;
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
}//while
|
}//while
|
||||||
ndbrequire(attrBufIndex == inBufLen);
|
ndbrequire(attrBufIndex == inBufLen);
|
||||||
@@ -678,12 +678,12 @@ int Dbtup::updateAttributes(Page* const pagePtr,
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
ljam();
|
ljam();
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
} else {
|
} else {
|
||||||
ljam();
|
ljam();
|
||||||
terrorCode = ZATTRIBUTE_ID_ERROR;
|
terrorCode = ZATTRIBUTE_ID_ERROR;
|
||||||
return (Uint32)-1;
|
return -1;
|
||||||
}//if
|
}//if
|
||||||
}//while
|
}//while
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -38,9 +38,9 @@ void Ndbcntr::initRecords()
|
|||||||
Ndbcntr::Ndbcntr(const class Configuration & conf):
|
Ndbcntr::Ndbcntr(const class Configuration & conf):
|
||||||
SimulatedBlock(NDBCNTR, conf),
|
SimulatedBlock(NDBCNTR, conf),
|
||||||
c_stopRec(* this),
|
c_stopRec(* this),
|
||||||
c_missra(* this),
|
|
||||||
cnoWaitrep6(0),
|
cnoWaitrep6(0),
|
||||||
cnoWaitrep7(0)
|
cnoWaitrep7(0),
|
||||||
|
c_missra(* this)
|
||||||
{
|
{
|
||||||
|
|
||||||
BLOCK_CONSTRUCTOR(Ndbcntr);
|
BLOCK_CONSTRUCTOR(Ndbcntr);
|
||||||
|
@@ -828,6 +828,8 @@ CommandInterpreter::executeShow(char* parameters)
|
|||||||
case NDB_MGM_NODE_TYPE_UNKNOWN:
|
case NDB_MGM_NODE_TYPE_UNKNOWN:
|
||||||
ndbout << "Error: Unknown Node Type" << endl;
|
ndbout << "Error: Unknown Node Type" << endl;
|
||||||
return;
|
return;
|
||||||
|
case NDB_MGM_NODE_TYPE_REP:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1638,7 +1640,7 @@ CommandInterpreter::executeStartBackup(char* /*parameters*/)
|
|||||||
if(tmp)
|
if(tmp)
|
||||||
{
|
{
|
||||||
ndbout << tmp;
|
ndbout << tmp;
|
||||||
int id;
|
unsigned int id;
|
||||||
if(sscanf(tmp, "%*[^:]: Backup %d ", &id) == 1 && id == backupId){
|
if(sscanf(tmp, "%*[^:]: Backup %d ", &id) == 1 && id == backupId){
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@@ -647,6 +647,7 @@ versionCallback(int nodeId, int version, void * anyData, int errCode){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NDB_MGM_NODE_TYPE_UNKNOWN:
|
case NDB_MGM_NODE_TYPE_UNKNOWN:
|
||||||
|
case NDB_MGM_NODE_TYPE_REP:
|
||||||
abort();
|
abort();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -85,6 +85,9 @@ Config::printAllNameValuePairs(NdbOut &out,
|
|||||||
MGM_REQUIRE(prop->get(n, &str_value));
|
MGM_REQUIRE(prop->get(n, &str_value));
|
||||||
out << str_value;
|
out << str_value;
|
||||||
break;
|
break;
|
||||||
|
case ConfigInfo::SECTION:
|
||||||
|
out << "SECTION";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
out << endl;
|
out << endl;
|
||||||
}
|
}
|
||||||
|
@@ -3559,7 +3559,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>§ions,
|
|||||||
{
|
{
|
||||||
unsigned c= 0;
|
unsigned c= 0;
|
||||||
p_db_hosts.get(str.c_str(),&c);
|
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 "
|
node_group_warning.append(".\n Host failure will "
|
||||||
"cause complete cluster shutdown.");
|
"cause complete cluster shutdown.");
|
||||||
else if (c > 0)
|
else if (c > 0)
|
||||||
|
@@ -42,7 +42,7 @@ InitConfigFileParser::~InitConfigFileParser() {
|
|||||||
// Read Config File
|
// Read Config File
|
||||||
//****************************************************************************
|
//****************************************************************************
|
||||||
InitConfigFileParser::Context::Context(const ConfigInfo * info)
|
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_config = new Properties(true);
|
||||||
m_defaults = new Properties(true);
|
m_defaults = new Properties(true);
|
||||||
@@ -349,6 +349,8 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
|
|||||||
case ConfigInfo::STRING:
|
case ConfigInfo::STRING:
|
||||||
MGM_REQUIRE(ctx.m_currentSection->put(pname, value));
|
MGM_REQUIRE(ctx.m_currentSection->put(pname, value));
|
||||||
break;
|
break;
|
||||||
|
case ConfigInfo::SECTION:
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1252,8 +1252,9 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
|
|||||||
|
|
||||||
Uint32 threshold = 0;
|
Uint32 threshold = 0;
|
||||||
LogLevel::EventCategory cat;
|
LogLevel::EventCategory cat;
|
||||||
|
int i;
|
||||||
|
|
||||||
for(unsigned i = 0; i<EventLogger::matrixSize; i++){
|
for(i = 0; (unsigned)i<EventLogger::matrixSize; i++){
|
||||||
if(EventLogger::matrix[i].eventType == eventType){
|
if(EventLogger::matrix[i].eventType == eventType){
|
||||||
cat = EventLogger::matrix[i].eventCategory;
|
cat = EventLogger::matrix[i].eventCategory;
|
||||||
threshold = EventLogger::matrix[i].threshold;
|
threshold = EventLogger::matrix[i].threshold;
|
||||||
@@ -1266,7 +1267,6 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
|
|||||||
|
|
||||||
Vector<NDB_SOCKET_TYPE> copy;
|
Vector<NDB_SOCKET_TYPE> copy;
|
||||||
m_clients.lock();
|
m_clients.lock();
|
||||||
int i;
|
|
||||||
for(i = m_clients.size() - 1; i >= 0; i--){
|
for(i = m_clients.size() - 1; i >= 0; i--){
|
||||||
if(threshold <= m_clients[i].m_logLevel.getLogLevel(cat)){
|
if(threshold <= m_clients[i].m_logLevel.getLogLevel(cat)){
|
||||||
if(m_clients[i].m_socket >= 0 &&
|
if(m_clients[i].m_socket >= 0 &&
|
||||||
@@ -1279,14 +1279,14 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
|
|||||||
}
|
}
|
||||||
m_clients.unlock();
|
m_clients.unlock();
|
||||||
|
|
||||||
for(i = 0; (unsigned)i<copy.size(); i++){
|
for(i = 0; (unsigned)i < copy.size(); i++){
|
||||||
NDB_CLOSE_SOCKET(copy[i]);
|
NDB_CLOSE_SOCKET(copy[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(copy.size()){
|
if(copy.size()){
|
||||||
LogLevel tmp; tmp.clear();
|
LogLevel tmp; tmp.clear();
|
||||||
m_clients.lock();
|
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);
|
tmp.set_max(m_clients[i].m_logLevel);
|
||||||
}
|
}
|
||||||
m_clients.unlock();
|
m_clients.unlock();
|
||||||
|
@@ -1440,11 +1440,11 @@ NdbOut&
|
|||||||
operator<<(NdbOut& out, const NdbBlob& blob)
|
operator<<(NdbOut& out, const NdbBlob& blob)
|
||||||
{
|
{
|
||||||
ndbout << dec << "o=" << blob.getOperationType();
|
ndbout << dec << "o=" << blob.getOperationType();
|
||||||
ndbout << dec << " s=" << blob.theState;
|
ndbout << dec << " s=" << (Uint32) blob.theState;
|
||||||
ndbout << dec << " n=" << blob.theNullFlag;;
|
ndbout << dec << " n=" << blob.theNullFlag;;
|
||||||
ndbout << dec << " l=" << blob.theLength;
|
ndbout << dec << " l=" << blob.theLength;
|
||||||
ndbout << dec << " p=" << blob.thePos;
|
ndbout << dec << " p=" << blob.thePos;
|
||||||
ndbout << dec << " u=" << blob.theHeadInlineUpdateFlag;
|
ndbout << dec << " u=" << (Uint32) blob.theHeadInlineUpdateFlag;
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -730,7 +730,8 @@ NdbConnection::doSend()
|
|||||||
theNdb->insert_completed_list(this);
|
theNdb->insert_completed_list(this);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
default:
|
default:
|
||||||
ndbout << "Inconsistent theSendStatus = " << theSendStatus << endl;
|
ndbout << "Inconsistent theSendStatus = "
|
||||||
|
<< (Uint32) theSendStatus << endl;
|
||||||
abort();
|
abort();
|
||||||
break;
|
break;
|
||||||
}//switch
|
}//switch
|
||||||
@@ -1643,6 +1644,10 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
|
|||||||
setOperationErrorCodeAbort(4115);
|
setOperationErrorCodeAbort(4115);
|
||||||
tOp = NULL;
|
tOp = NULL;
|
||||||
break;
|
break;
|
||||||
|
case NdbOperation::NotDefined:
|
||||||
|
case NdbOperation::NotDefined2:
|
||||||
|
assert();
|
||||||
|
break;
|
||||||
}//if
|
}//if
|
||||||
}//while
|
}//while
|
||||||
theReleaseOnClose = true;
|
theReleaseOnClose = true;
|
||||||
@@ -1924,14 +1929,14 @@ NdbConnection::printState()
|
|||||||
CASE(Connected);
|
CASE(Connected);
|
||||||
CASE(DisConnecting);
|
CASE(DisConnecting);
|
||||||
CASE(ConnectFailure);
|
CASE(ConnectFailure);
|
||||||
default: ndbout << theStatus;
|
default: ndbout << (Uint32) theStatus;
|
||||||
}
|
}
|
||||||
switch (theListState) {
|
switch (theListState) {
|
||||||
CASE(NotInList);
|
CASE(NotInList);
|
||||||
CASE(InPreparedList);
|
CASE(InPreparedList);
|
||||||
CASE(InSendList);
|
CASE(InSendList);
|
||||||
CASE(InCompletedList);
|
CASE(InCompletedList);
|
||||||
default: ndbout << theListState;
|
default: ndbout << (Uint32) theListState;
|
||||||
}
|
}
|
||||||
switch (theSendStatus) {
|
switch (theSendStatus) {
|
||||||
CASE(NotInit);
|
CASE(NotInit);
|
||||||
@@ -1944,7 +1949,7 @@ NdbConnection::printState()
|
|||||||
CASE(sendTC_ROLLBACK);
|
CASE(sendTC_ROLLBACK);
|
||||||
CASE(sendTC_COMMIT);
|
CASE(sendTC_COMMIT);
|
||||||
CASE(sendTC_OP);
|
CASE(sendTC_OP);
|
||||||
default: ndbout << theSendStatus;
|
default: ndbout << (Uint32) theSendStatus;
|
||||||
}
|
}
|
||||||
switch (theCommitStatus) {
|
switch (theCommitStatus) {
|
||||||
CASE(NotStarted);
|
CASE(NotStarted);
|
||||||
@@ -1952,14 +1957,14 @@ NdbConnection::printState()
|
|||||||
CASE(Committed);
|
CASE(Committed);
|
||||||
CASE(Aborted);
|
CASE(Aborted);
|
||||||
CASE(NeedAbort);
|
CASE(NeedAbort);
|
||||||
default: ndbout << theCommitStatus;
|
default: ndbout << (Uint32) theCommitStatus;
|
||||||
}
|
}
|
||||||
switch (theCompletionStatus) {
|
switch (theCompletionStatus) {
|
||||||
CASE(NotCompleted);
|
CASE(NotCompleted);
|
||||||
CASE(CompletedSuccess);
|
CASE(CompletedSuccess);
|
||||||
CASE(CompletedFailure);
|
CASE(CompletedFailure);
|
||||||
CASE(DefinitionFailure);
|
CASE(DefinitionFailure);
|
||||||
default: ndbout << theCompletionStatus;
|
default: ndbout << (Uint32) theCompletionStatus;
|
||||||
}
|
}
|
||||||
ndbout << endl;
|
ndbout << endl;
|
||||||
}
|
}
|
||||||
|
@@ -148,6 +148,9 @@ NdbColumnImpl::init(Type t)
|
|||||||
m_length = 4;
|
m_length = 4;
|
||||||
m_cs = default_cs;
|
m_cs = default_cs;
|
||||||
break;
|
break;
|
||||||
|
case Undefined:
|
||||||
|
assert();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
m_pk = false;
|
m_pk = false;
|
||||||
m_nullable = false;
|
m_nullable = false;
|
||||||
|
@@ -92,7 +92,7 @@ NdbReceiver::getValue(const NdbColumnImpl* tAttrInfo, char * user_dst_ptr){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define KEY_ATTR_ID (~0)
|
#define KEY_ATTR_ID (~(Uint32)0)
|
||||||
|
|
||||||
void
|
void
|
||||||
NdbReceiver::calculate_batch_size(Uint32 key_size,
|
NdbReceiver::calculate_batch_size(Uint32 key_size,
|
||||||
|
@@ -33,7 +33,7 @@ Ndb::checkFailedNode()
|
|||||||
DBUG_PRINT("enter", ("theNoOfDBnodes: %d", theNoOfDBnodes));
|
DBUG_PRINT("enter", ("theNoOfDBnodes: %d", theNoOfDBnodes));
|
||||||
|
|
||||||
DBUG_ASSERT(theNoOfDBnodes < MAX_NDB_NODES);
|
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];
|
const NodeId node_id = theDBnodes[i];
|
||||||
DBUG_PRINT("info", ("i: %d, node_id: %d", i, node_id));
|
DBUG_PRINT("info", ("i: %d, node_id: %d", i, node_id));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user