From: Date: June 27 2006 1:12pm Subject: bk commit into 5.1 tree (tomas:1.2222) BUG#19852 List-Archive: http://lists.mysql.com/commits/8299 X-Bug: 19852 Message-Id: <20060627111249.2C2B080B50@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of tomas. When tomas 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.2222 06/06/27 13:12:34 tomas@stripped +10 -0 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 1.145 06/06/27 13:12:25 tomas@stripped +8 -8 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/ndbapi/NdbDictionary.cpp 1.61 06/06/27 13:12:25 tomas@stripped +1 -0 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 1.28 06/06/27 13:12:24 tomas@stripped +23 -27 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 1.113 06/06/27 13:12:24 tomas@stripped +1 -7 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 1.50 06/06/27 13:12:24 tomas@stripped +0 -2 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 1.92 06/06/27 13:12:24 tomas@stripped +2 -3 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/include/ndbapi/NdbDictionary.hpp 1.80 06/06/27 13:12:23 tomas@stripped +0 -7 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/include/kernel/signaldata/TupFrag.hpp 1.12 06/06/27 13:12:23 tomas@stripped +2 -4 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/include/kernel/signaldata/LqhFrag.hpp 1.9 06/06/27 13:12:23 tomas@stripped +2 -2 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 storage/ndb/include/kernel/signaldata/DictTabInfo.hpp 1.31 06/06/27 13:12:23 tomas@stripped +0 -2 Bug #19852 Restoring backup made from cluster with full data memory fails - post merge fixes for 5.1 # 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: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/mysql-5.1-new-ndb --- 1.30/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp 2006-06-27 11:30:16 +02:00 +++ 1.31/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp 2006-06-27 13:12:23 +02:00 @@ -315,8 +315,6 @@ Uint32 CustomTriggerId; Uint32 TablespaceId; Uint32 TablespaceVersion; - Uint32 MaxRowsLow; - Uint32 MaxRowsHigh; Uint32 DefaultNoPartFlag; Uint32 LinearHashFlag; /* --- 1.8/storage/ndb/include/kernel/signaldata/LqhFrag.hpp 2006-06-27 11:22:35 +02:00 +++ 1.9/storage/ndb/include/kernel/signaldata/LqhFrag.hpp 2006-06-27 13:12:23 +02:00 @@ -123,9 +123,9 @@ Uint32 kValue; Uint32 schemaVersion; Uint32 nextLCP; - Uint16 noOfNewAttr; - Uint16 noOfCharsets; + Uint32 noOfCharsets; Uint32 startGci; + Uint32 tableType; // DictTabInfo::TableType Uint32 primaryTableId; // table of index or RNIL Uint32 tablespace_id; // RNIL for MM table Uint16 tableId; --- 1.11/storage/ndb/include/kernel/signaldata/TupFrag.hpp 2006-06-27 11:22:35 +02:00 +++ 1.12/storage/ndb/include/kernel/signaldata/TupFrag.hpp 2006-06-27 13:12:23 +02:00 @@ -30,7 +30,7 @@ friend class Dblqh; friend class Dbtup; public: - STATIC_CONST( SignalLength = 18 ); + STATIC_CONST( SignalLength = 17 ); private: Uint32 userPtr; Uint32 userRef; @@ -45,10 +45,8 @@ Uint32 noOfNullAttr; Uint32 schemaVersion; Uint32 noOfKeyAttr; - Uint16 noOfNewAttr; - Uint16 noOfCharsets; + Uint32 noOfCharsets; Uint32 checksumIndicator; - Uint32 noOfAttributeGroups; Uint32 globalCheckpointIdIndicator; Uint32 tablespaceid; }; --- 1.79/storage/ndb/include/ndbapi/NdbDictionary.hpp 2006-06-27 10:15:46 +02:00 +++ 1.80/storage/ndb/include/ndbapi/NdbDictionary.hpp 2006-06-27 13:12:23 +02:00 @@ -831,13 +831,6 @@ virtual int getObjectVersion() const; /** - * Set/Get Maximum number of rows in table (only used to calculate - * number of partitions). - */ - void setMaxRows(Uint64 maxRows); - Uint64 getMaxRows() const; - - /** * Set/Get indicator if default number of partitions is used in table. */ void setDefaultNoPartitionsFlag(Uint32 indicator); --- 1.91/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-06-27 11:22:35 +02:00 +++ 1.92/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-06-27 13:12:24 +02:00 @@ -5362,7 +5362,6 @@ req->nextLCP = lcpNo; req->noOfKeyAttr = tabPtr.p->noOfPrimkey; - req->noOfNewAttr = 0; req->noOfCharsets = tabPtr.p->noOfCharsets; req->checksumIndicator = 1; req->GCPIndicator = 1; @@ -5984,8 +5983,8 @@ tablePtr.p->m_tablespace_id = c_tableDesc.TablespaceId; tablePtr.p->maxRowsLow = c_tableDesc.MaxRowsLow; tablePtr.p->maxRowsHigh = c_tableDesc.MaxRowsHigh; - tablePtr.p->minRowsLow = tableDesc.MinRowsLow; - tablePtr.p->minRowsHigh = tableDesc.MinRowsHigh; + tablePtr.p->minRowsLow = c_tableDesc.MinRowsLow; + tablePtr.p->minRowsHigh = c_tableDesc.MinRowsHigh; tablePtr.p->defaultNoPartFlag = c_tableDesc.DefaultNoPartFlag; tablePtr.p->linearHashFlag = c_tableDesc.LinearHashFlag; --- 1.49/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2006-06-27 11:22:35 +02:00 +++ 1.50/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2006-06-27 13:12:24 +02:00 @@ -448,9 +448,7 @@ Uint16 totalAttrReceived; Uint16 fragCopyCreation; Uint16 noOfKeyAttr; - Uint16 noOfNewAttr; Uint16 noOfCharsets; - Uint16 noOfAttributeGroups; Uint16 lh3DistrBits; Uint16 tableType; Uint16 primaryTableId; --- 1.112/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-27 11:22:36 +02:00 +++ 1.113/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-27 13:12:24 +02:00 @@ -1007,7 +1007,6 @@ Uint32 ttupKeyLength = req->keyLength; Uint32 nextLcp = req->nextLCP; Uint32 noOfKeyAttr = req->noOfKeyAttr; - Uint32 noOfNewAttr = req->noOfNewAttr; Uint32 noOfCharsets = req->noOfCharsets; Uint32 checksumIndicator = req->checksumIndicator; Uint32 gcpIndicator = req->GCPIndicator; @@ -1128,7 +1127,6 @@ addfragptr.p->fragCopyCreation = (tmp == 0 ? 0 : 1); addfragptr.p->addfragErrorCode = 0; addfragptr.p->noOfKeyAttr = noOfKeyAttr; - addfragptr.p->noOfNewAttr = noOfNewAttr; addfragptr.p->noOfCharsets = noOfCharsets; addfragptr.p->checksumIndicator = checksumIndicator; addfragptr.p->GCPIndicator = gcpIndicator; @@ -1282,12 +1280,10 @@ tupFragReq->noOfNullAttr = addfragptr.p->noOfNull; tupFragReq->schemaVersion = addfragptr.p->schemaVer; tupFragReq->noOfKeyAttr = addfragptr.p->noOfKeyAttr; - tupFragReq->noOfNewAttr = addfragptr.p->noOfNewAttr; tupFragReq->noOfCharsets = addfragptr.p->noOfCharsets; tupFragReq->checksumIndicator = addfragptr.p->checksumIndicator; - tupFragReq->noOfAttributeGroups = addfragptr.p->noOfAttributeGroups; tupFragReq->globalCheckpointIdIndicator = addfragptr.p->GCPIndicator; - tupFragReq->tablespaceId = addfragptr.p->tablespace_id; + tupFragReq->tablespaceid = addfragptr.p->tablespace_id; sendSignal(fragptr.p->tupBlockref, GSN_TUPFRAGREQ, signal, TupFragReq::SignalLength, JBB); return; @@ -1307,10 +1303,8 @@ tupFragReq->noOfNullAttr = 0; /* ordered index: no nullable */ tupFragReq->schemaVersion = addfragptr.p->schemaVer; tupFragReq->noOfKeyAttr = 1; /* ordered index: one key */ - tupFragReq->noOfNewAttr = addfragptr.p->noOfNewAttr; tupFragReq->noOfCharsets = addfragptr.p->noOfCharsets; tupFragReq->checksumIndicator = addfragptr.p->checksumIndicator; - tupFragReq->noOfAttributeGroups = addfragptr.p->noOfAttributeGroups; tupFragReq->globalCheckpointIdIndicator = addfragptr.p->GCPIndicator; sendSignal(fragptr.p->tupBlockref, GSN_TUPFRAGREQ, signal, TupFragReq::SignalLength, JBB); --- 1.27/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2006-06-27 11:22:36 +02:00 +++ 1.28/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp 2006-06-27 13:12:24 +02:00 @@ -53,19 +53,15 @@ Uint32 reqinfo = tupFragReq->reqInfo; regTabPtr.i = tupFragReq->tableId; Uint32 noOfAttributes = tupFragReq->noOfAttr; - Uint32 pages = tupFragReq->pages; Uint32 fragId = tupFragReq->fragId; Uint32 noOfNullAttr = tupFragReq->noOfNullAttr; /* Uint32 schemaVersion = tupFragReq->schemaVersion;*/ Uint32 noOfKeyAttr = tupFragReq->noOfKeyAttr; - - Uint32 noOfNewAttr = tupFragReq->noOfNewAttrREMOVE; Uint32 noOfCharsets = tupFragReq->noOfCharsets; Uint32 checksumIndicator = tupFragReq->checksumIndicator; - Uint32 noOfAttributeGroups = tupFragReq->noOfAttributeGroupsREMOVE; - Uint32 globalCheckpointIdIndicator = tupFragReq->globalCheckpointIdIndicator; - Uint32 tablespace= tupFragReq->tablespace; + Uint32 gcpIndicator = tupFragReq->globalCheckpointIdIndicator; + Uint32 tablespace_id= tupFragReq->tablespaceid; Uint64 maxRows = (((Uint64)tupFragReq->maxRowsHigh) << 32) + tupFragReq->maxRowsLow; @@ -144,7 +140,7 @@ regFragPtr.p->fragTableId= regTabPtr.i; regFragPtr.p->fragmentId= fragId; - regFragPtr.p->m_tablespace_id= tablespace; + regFragPtr.p->m_tablespace_id= tablespace_id; regFragPtr.p->m_undo_complete= false; regFragPtr.p->m_lcp_scan_op = RNIL; regFragPtr.p->m_lcp_keep_list = RNIL; @@ -423,26 +419,6 @@ return; } - if (lastAttr) - { - ljam(); - Uint32 noRowsPerPage = ZWORDS_ON_PAGE/regTabPtr.p->tupheadsize; - Uint32 noAllocatedPages = - (fragOperPtr.p->minRows + noRowsPerPage - 1 )/ noRowsPerPage; - if (fragOperPtr.p->minRows == 0) - noAllocatedPages = 2; - else if (noAllocatedPages == 0) - noAllocatedPages = 2; - noAllocatedPages = allocFragPages(regFragPtr.p, noAllocatedPages); - - if (noAllocatedPages == 0) { - ljam(); - terrorCode = ZNO_PAGES_ALLOCATED_ERROR; - addattrrefuseLab(signal, regFragPtr, fragOperPtr, regTabPtr.p, fragId); - return; - }//if - } - /* **************************************************************** */ /* ************** TUP_ADD_ATTCONF ****************** */ /* **************************************************************** */ @@ -558,6 +534,26 @@ } #endif + { + ndbrequire(regTabPtr.p->m_offsets[MM].m_fix_header_size > 0); + Uint32 noRowsPerPage = + ZWORDS_ON_PAGE/regTabPtr.p->m_offsets[MM].m_fix_header_size; + Uint32 noAllocatedPages = + (fragOperPtr.p->minRows + noRowsPerPage - 1 )/ noRowsPerPage; + if (fragOperPtr.p->minRows == 0) + noAllocatedPages = 2; + else if (noAllocatedPages == 0) + noAllocatedPages = 2; + noAllocatedPages = allocFragPages(regFragPtr.p, noAllocatedPages); + + if (noAllocatedPages == 0) { + ljam(); + terrorCode = ZNO_PAGES_ALLOCATED_ERROR; + addattrrefuseLab(signal, regFragPtr, fragOperPtr, regTabPtr.p, fragId); + return; + }//if + } + CreateFilegroupImplReq rep; if(regTabPtr.p->m_no_of_disk_attributes) { --- 1.60/storage/ndb/src/ndbapi/NdbDictionary.cpp 2006-06-27 11:22:36 +02:00 +++ 1.61/storage/ndb/src/ndbapi/NdbDictionary.cpp 2006-06-27 13:12:25 +02:00 @@ -451,6 +451,7 @@ return m_impl.m_max_rows; } +void NdbDictionary::Table::setMinRows(Uint64 minRows) { m_impl.m_min_rows = minRows; --- 1.144/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2006-06-27 11:22:36 +02:00 +++ 1.145/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2006-06-27 13:12:25 +02:00 @@ -2067,11 +2067,11 @@ fragmentTypeMapping, (Uint32)NdbDictionary::Object::FragUndefined); - Uint64 max_rows = ((Uint64)tableDesc.MaxRowsHigh) << 32; - max_rows += tableDesc.MaxRowsLow; + Uint64 max_rows = ((Uint64)tableDesc->MaxRowsHigh) << 32; + max_rows += tableDesc->MaxRowsLow; impl->m_max_rows = max_rows; - Uint64 min_rows = ((Uint64)tableDesc.MinRowsHigh) << 32; - min_rows += tableDesc.MinRowsLow; + Uint64 min_rows = ((Uint64)tableDesc->MinRowsHigh) << 32; + min_rows += tableDesc->MinRowsLow; impl->m_min_rows = min_rows; impl->m_default_no_part_flag = tableDesc->DefaultNoPartFlag; impl->m_linear_flag = tableDesc->LinearHashFlag; @@ -2526,10 +2526,10 @@ tmpTab->TableType = DictTabInfo::UserTable; tmpTab->PrimaryTableId = impl.m_primaryTableId; tmpTab->NoOfAttributes = sz; - tmpTab.MaxRowsHigh = (Uint32)(impl.m_max_rows >> 32); - tmpTab.MaxRowsLow = (Uint32)(impl.m_max_rows & 0xFFFFFFFF); - tmpTab.MinRowsHigh = (Uint32)(impl.m_min_rows >> 32); - tmpTab.MinRowsLow = (Uint32)(impl.m_min_rows & 0xFFFFFFFF); + tmpTab->MaxRowsHigh = (Uint32)(impl.m_max_rows >> 32); + tmpTab->MaxRowsLow = (Uint32)(impl.m_max_rows & 0xFFFFFFFF); + tmpTab->MinRowsHigh = (Uint32)(impl.m_min_rows >> 32); + tmpTab->MinRowsLow = (Uint32)(impl.m_min_rows & 0xFFFFFFFF); tmpTab->DefaultNoPartFlag = impl.m_default_no_part_flag; tmpTab->LinearHashFlag = impl.m_linear_flag;