Commit d432e3df authored by unknown's avatar unknown

removed some (Uint32)-1 casts

parent 370fa1d0
......@@ -746,14 +746,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
//--------------------------------------------------------------------
// Read Primary Key Values
//--------------------------------------------------------------------
noPrimKey = readAttributes(pagep.p,
tupheadoffset,
&tableDescriptor[regTabPtr->readKeyArray].tabDescr,
regTabPtr->noOfKeyAttr,
keyBuffer,
ZATTR_BUFFER_SIZE,
true);
ndbrequire(noPrimKey != (Uint32)-1);
int ret= readAttributes(pagep.p,
tupheadoffset,
&tableDescriptor[regTabPtr->readKeyArray].tabDescr,
regTabPtr->noOfKeyAttr,
keyBuffer,
ZATTR_BUFFER_SIZE,
true);
ndbrequire(ret != -1);
noPrimKey= ret;
Uint32 numAttrsToRead;
if ((regOperPtr->optype == ZUPDATE) &&
......@@ -788,14 +789,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
if ((regOperPtr->optype != ZDELETE) ||
(trigPtr->sendBeforeValues)) {
ljam();
noMainWords = readAttributes(pagep.p,
tupheadoffset,
&readBuffer[0],
numAttrsToRead,
mainBuffer,
ZATTR_BUFFER_SIZE,
true);
ndbrequire(noMainWords != (Uint32)-1);
int ret= readAttributes(pagep.p,
tupheadoffset,
&readBuffer[0],
numAttrsToRead,
mainBuffer,
ZATTR_BUFFER_SIZE,
true);
ndbrequire(ret != -1);
noMainWords= ret;
} else {
ljam();
noMainWords = 0;
......@@ -813,15 +815,16 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
pagep.i = regOperPtr->realPageIdC;
ptrCheckGuard(pagep, cnoOfPage, page);
noCopyWords = readAttributes(pagep.p,
tupheadoffset,
&readBuffer[0],
numAttrsToRead,
copyBuffer,
ZATTR_BUFFER_SIZE,
true);
int ret= readAttributes(pagep.p,
tupheadoffset,
&readBuffer[0],
numAttrsToRead,
copyBuffer,
ZATTR_BUFFER_SIZE,
true);
ndbrequire(noCopyWords != (Uint32)-1);
ndbrequire(ret != -1);
noCopyWords = ret;
if ((noMainWords == noCopyWords) &&
(memcmp(mainBuffer, copyBuffer, noMainWords << 2) == 0)) {
//--------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment