Commit 21f7111f authored by joreland@mysql.com's avatar joreland@mysql.com

fix bugs in new distr handling

parent c690398a
...@@ -68,11 +68,8 @@ printTCKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiver ...@@ -68,11 +68,8 @@ printTCKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiver
if(sig->getInterpretedFlag(requestInfo)){ if(sig->getInterpretedFlag(requestInfo)){
fprintf(output, "Interpreted "); fprintf(output, "Interpreted ");
} }
if(sig->getDistributionGroupFlag(requestInfo)){
fprintf(output, "DGroup = %d ", sig->distrGroupHashValue);
}
if(sig->getDistributionKeyFlag(sig->requestInfo)){ if(sig->getDistributionKeyFlag(sig->requestInfo)){
fprintf(output, "DKey = %d ", sig->distributionKeySize); fprintf(output, " d-key");
} }
fprintf(output, "\n"); fprintf(output, "\n");
} }
......
...@@ -146,6 +146,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, ...@@ -146,6 +146,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
if (cs != 0) { if (cs != 0) {
// current limitation: strxfrm does not increase length // current limitation: strxfrm does not increase length
assert(cs->strxfrm_multiply == 1); assert(cs->strxfrm_multiply == 1);
((Uint32*)xfrmData)[sizeInBytes >> 2] = 0;
unsigned n = unsigned n =
(*cs->coll->strnxfrm)(cs, (*cs->coll->strnxfrm)(cs,
(uchar*)xfrmData, sizeof(xfrmData), (uchar*)xfrmData, sizeof(xfrmData),
...@@ -230,13 +231,10 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, ...@@ -230,13 +231,10 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
tErrorLine++; tErrorLine++;
theErrorLine = tErrorLine; theErrorLine = tErrorLine;
if (tNoKeysDef == 0) { if(tDistrKey)
if (tDistrKey && handle_distribution_key((Uint64*)aValue, totalSizeInWords);
handle_distribution_key((Uint64*)aValue, totalSizeInWords))
{ if (tNoKeysDef == 0) {
return -1;
}
if (tOpType == UpdateRequest) { if (tOpType == UpdateRequest) {
if (tInterpretInd == 1) { if (tInterpretInd == 1) {
theStatus = GetValue; theStatus = GetValue;
...@@ -521,19 +519,15 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len) ...@@ -521,19 +519,15 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len)
if(theDistrKeyIndicator_ == 1 || if(theDistrKeyIndicator_ == 1 ||
(theNoOfTupKeyLeft > 0 && m_accessTable->m_noOfDistributionKeys > 1)) (theNoOfTupKeyLeft > 0 && m_accessTable->m_noOfDistributionKeys > 1))
{ {
ndbout_c("handle_distribution_key - exit");
return 0; return 0;
} }
if(m_accessTable->m_noOfDistributionKeys == 1) if(m_accessTable->m_noOfDistributionKeys == 1)
{ {
setPartitionHash(value, len); setPartitionHash(value, len);
ndbout_c("handle_distribution_key - 1 key");
} }
else else
{ {
ndbout_c("handle_distribution_key - long");
/** /**
* Copy distribution key to linear memory * Copy distribution key to linear memory
*/ */
......
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