Fix for 840, invalid tuple size.

Still don't know reason, but this works
This commit is contained in:
unknown 2004-06-03 08:09:04 +02:00
parent 6868112c76
commit db858c08b7

View file

@ -528,9 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId = tAttrInfo->m_attrId;
const char *aValue = aValuePassed;
Uint32 ahValue;
AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
if (aValue == NULL) {
if (tAttrInfo->m_nullable) {
AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
ah.setNULL();
insertATTRINFO(ahValue);
// Insert Attribute Id with the value
@ -564,7 +564,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
}//if
const Uint32 totalSizeInWords = (sizeInBytes + 3)/4; // Including bits in last word
const Uint32 sizeInWords = sizeInBytes / 4; // Excluding bits in last word
ah.setDataSize(totalSizeInWords);
AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId,
totalSizeInWords);
insertATTRINFO( ahValue );
/***********************************************************************