diff options
author | joreland@mysql.com <> | 2005-06-07 10:50:27 +0200 |
---|---|---|
committer | joreland@mysql.com <> | 2005-06-07 10:50:27 +0200 |
commit | 7050d08f1810faf12d1499a06e3f9a50cddbbac2 (patch) | |
tree | a4d3f67f8605866eb8c07f60229a4785be7f445c /ndb/src/ndbapi | |
parent | ac76e6db6a89a5cad767bd1e2c6a39df82790ee6 (diff) | |
parent | 7e031804e45baaf1f9dd1f75934e8fba6620e237 (diff) | |
download | mariadb-git-7050d08f1810faf12d1499a06e3f9a50cddbbac2.tar.gz |
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
Diffstat (limited to 'ndb/src/ndbapi')
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.cpp | 8 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbOperationExec.cpp | 16 |
2 files changed, 17 insertions, 7 deletions
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index baf5c7e5c83..28e585b65b8 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1649,7 +1649,11 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, abort(); } - int distKeys= impl.m_noOfDistributionKeys; + int distKeys= impl.m_noOfDistributionKeys && + impl.m_noOfDistributionKeys < impl.m_noOfKeys; + + assert(distKeys == 0 || distKeys == 1); + for(i = 0; i<sz; i++){ const NdbColumnImpl * col = impl.m_columns[i]; if(col == 0) @@ -1661,7 +1665,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb, tmpAttr.AttributeId = i; tmpAttr.AttributeKeyFlag = col->m_pk; tmpAttr.AttributeNullableFlag = col->m_nullable; - tmpAttr.AttributeDKey = col->m_distributionKey; + tmpAttr.AttributeDKey = distKeys * col->m_distributionKey; tmpAttr.AttributeExtType = (Uint32)col->m_type; tmpAttr.AttributeExtPrecision = ((unsigned)col->m_precision & 0xFFFF); diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp index 4200300615d..58a816e3c1a 100644 --- a/ndb/src/ndbapi/NdbOperationExec.cpp +++ b/ndb/src/ndbapi/NdbOperationExec.cpp @@ -104,8 +104,9 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) { Uint32 tTransId1, tTransId2; Uint32 tReqInfo; - Uint32 tInterpretInd = theInterpretIndicator; - + Uint8 tInterpretInd = theInterpretIndicator; + Uint8 tDirtyIndicator = theDirtyIndicator; + Uint32 tTotalCurrAI_Len = theTotalCurrAI_Len; theErrorLine = 0; if (tInterpretInd != 1) { @@ -123,7 +124,13 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) if (tStatus != GetValue) { setErrorCodeAbort(4116); return -1; - }//if + } + else if(unlikely(tDirtyIndicator && tTotalCurrAI_Len == 0)) + { + getValue(NdbDictionary::Column::FRAGMENT); + tTotalCurrAI_Len = theTotalCurrAI_Len; + assert(theTotalCurrAI_Len); + } } else { setErrorCodeAbort(4005); return -1; @@ -132,6 +139,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) if (prepareSendInterpreted() == -1) { return -1; }//if + tTotalCurrAI_Len = theTotalCurrAI_Len; }//if //------------------------------------------------------------- @@ -140,7 +148,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) //------------------------------------------------------------- TcKeyReq * const tcKeyReq = CAST_PTR(TcKeyReq, theTCREQ->getDataPtrSend()); - Uint32 tTotalCurrAI_Len = theTotalCurrAI_Len; Uint32 tTableId = m_currentTable->m_tableId; Uint32 tSchemaVersion = m_currentTable->m_version; @@ -188,7 +195,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) tcKeyReq->setStartFlag(tReqInfo, tStartIndicator); tcKeyReq->setInterpretedFlag(tReqInfo, tInterpretIndicator); - Uint8 tDirtyIndicator = theDirtyIndicator; OperationType tOperationType = theOperationType; Uint32 tTupKeyLen = theTupKeyLen; Uint8 abortOption = |