From: Date: June 7 2005 12:50pm Subject: bk commit into 5.0 tree (joreland:1.1930) BUG#10190 List-Archive: http://lists.mysql.com/internals/25683 X-Bug: 10190 Message-Id: <20050607105049.E3B78E188C@eel.ndb.mysql.com.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1930 05/06/07 12:50:42 joreland@stripped +1 -0 ndb - backup/restore, fix count of dist keys better fix for bug#10190 ndb/src/ndbapi/NdbDictionaryImpl.cpp 1.80 05/06/07 12:50:39 joreland@stripped +8 -6 better fix for bug#10190 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: joreland # Host: eel.ndb.mysql.com.ndb.mysql.com # Root: /home/jonas/src/mysql-5.0 --- 1.79/ndb/src/ndbapi/NdbDictionaryImpl.cpp Thu May 26 14:02:30 2005 +++ 1.80/ndb/src/ndbapi/NdbDictionaryImpl.cpp Tue Jun 7 12:50:39 2005 @@ -1605,6 +1605,7 @@ bool haveAutoIncrement = false; Uint64 autoIncrementValue = 0; + Uint32 distKeys= 0; for(i = 0; im_autoIncrementInitialValue; - } + } + if (col->m_distributionKey) + distKeys++; } // Check max length of frm data @@ -1649,11 +1652,10 @@ abort(); } - int distKeys= impl.m_noOfDistributionKeys && - impl.m_noOfDistributionKeys < impl.m_noOfKeys; + if (distKeys == impl.m_noOfKeys) + distKeys= 0; + impl.m_noOfDistributionKeys= distKeys; - assert(distKeys == 0 || distKeys == 1); - for(i = 0; im_pk; tmpAttr.AttributeNullableFlag = col->m_nullable; - tmpAttr.AttributeDKey = distKeys * col->m_distributionKey; + tmpAttr.AttributeDKey = distKeys ? col->m_distributionKey : 0; tmpAttr.AttributeExtType = (Uint32)col->m_type; tmpAttr.AttributeExtPrecision = ((unsigned)col->m_precision & 0xFFFF);