Commit 8e88ed19 authored by joreland@mysql.com's avatar joreland@mysql.com

Fix for 840, invalid tuple size.

Still don't know reason, but this works
parent 0a69e028
...@@ -528,9 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, ...@@ -528,9 +528,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
tAttrId = tAttrInfo->m_attrId; tAttrId = tAttrInfo->m_attrId;
const char *aValue = aValuePassed; const char *aValue = aValuePassed;
Uint32 ahValue; Uint32 ahValue;
AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
if (aValue == NULL) { if (aValue == NULL) {
if (tAttrInfo->m_nullable) { if (tAttrInfo->m_nullable) {
AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId, 0);
ah.setNULL(); ah.setNULL();
insertATTRINFO(ahValue); insertATTRINFO(ahValue);
// Insert Attribute Id with the value // Insert Attribute Id with the value
...@@ -564,7 +564,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, ...@@ -564,7 +564,8 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
}//if }//if
const Uint32 totalSizeInWords = (sizeInBytes + 3)/4; // Including bits in last word const Uint32 totalSizeInWords = (sizeInBytes + 3)/4; // Including bits in last word
const Uint32 sizeInWords = sizeInBytes / 4; // Excluding 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 ); insertATTRINFO( ahValue );
/*********************************************************************** /***********************************************************************
......
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