From: Date: May 26 2005 2:03pm Subject: bk commit into 5.0 tree (joreland:1.1911) BUG#10190 List-Archive: http://lists.mysql.com/internals/25350 X-Bug: 10190 Message-Id: <20050526120332.936F7E1895@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.1911 05/05/26 14:03:26 joreland@stripped +3 -0 bug#10190 - ndb ndb_restore invalid handling of distribution keys when restoring meta data (also aligned printout with that of ndb_desc) ndb/tools/restore/Restore.cpp 1.23 05/05/26 14:02:30 joreland@stripped +3 -10 Use same format as desc when printing meta in ndb_restore ndb/tools/Makefile.am 1.15 05/05/26 14:02:30 joreland@stripped +2 -1 Use same format as desc when printing meta in ndb_restore ndb/src/ndbapi/NdbDictionaryImpl.cpp 1.79 05/05/26 14:02:30 joreland@stripped +6 -2 Don't call it a distribution key if all keys are set as distribution key # 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.22/ndb/tools/restore/Restore.cpp Thu Dec 16 14:16:24 2004 +++ 1.23/ndb/tools/restore/Restore.cpp Thu May 26 14:02:30 2005 @@ -925,19 +925,12 @@ return ndbout; } +#include NdbOut & operator<<(NdbOut& ndbout, const TableS & table){ - ndbout << endl << "Table: " << table.getTableName() << endl; - for (int j = 0; j < table.getNoOfAttributes(); j++) - { - const AttributeDesc * desc = table[j]; - ndbout << desc->m_column->getName() << ": " - << (Uint32) desc->m_column->getType(); - ndbout << " key: " << (Uint32) desc->m_column->getPrimaryKey(); - ndbout << " array: " << desc->arraySize; - ndbout << " size: " << desc->size << endl; - } // for + + ndbout << (* (NDBT_Table*)table.m_dictTable) << endl; return ndbout; } --- 1.78/ndb/src/ndbapi/NdbDictionaryImpl.cpp Sun May 22 20:58:37 2005 +++ 1.79/ndb/src/ndbapi/NdbDictionaryImpl.cpp Thu May 26 14:02:30 2005 @@ -1649,7 +1649,11 @@ 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; im_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); --- 1.14/ndb/tools/Makefile.am Fri Dec 31 06:19:26 2004 +++ 1.15/ndb/tools/Makefile.am Thu May 26 14:02:30 2005 @@ -30,7 +30,8 @@ restore/consumer.cpp \ restore/consumer_restore.cpp \ restore/consumer_printer.cpp \ - restore/Restore.cpp + restore/Restore.cpp \ + ../test/src/NDBT_ResultRow.cpp $(tools_common_sources) include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/type_ndbapitools.mk.am