mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #19852 Restoring backup made from cluster with full data memory fails
- post merge fixes for 5.1
This commit is contained in:
@ -315,8 +315,6 @@ public:
|
||||
Uint32 CustomTriggerId;
|
||||
Uint32 TablespaceId;
|
||||
Uint32 TablespaceVersion;
|
||||
Uint32 MaxRowsLow;
|
||||
Uint32 MaxRowsHigh;
|
||||
Uint32 DefaultNoPartFlag;
|
||||
Uint32 LinearHashFlag;
|
||||
/*
|
||||
|
@ -123,9 +123,9 @@ private:
|
||||
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;
|
||||
|
@ -30,7 +30,7 @@ class TupFragReq {
|
||||
friend class Dblqh;
|
||||
friend class Dbtup;
|
||||
public:
|
||||
STATIC_CONST( SignalLength = 18 );
|
||||
STATIC_CONST( SignalLength = 17 );
|
||||
private:
|
||||
Uint32 userPtr;
|
||||
Uint32 userRef;
|
||||
@ -45,10 +45,8 @@ private:
|
||||
Uint32 noOfNullAttr;
|
||||
Uint32 schemaVersion;
|
||||
Uint32 noOfKeyAttr;
|
||||
Uint16 noOfNewAttr;
|
||||
Uint16 noOfCharsets;
|
||||
Uint32 noOfCharsets;
|
||||
Uint32 checksumIndicator;
|
||||
Uint32 noOfAttributeGroups;
|
||||
Uint32 globalCheckpointIdIndicator;
|
||||
Uint32 tablespaceid;
|
||||
};
|
||||
|
@ -830,13 +830,6 @@ public:
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
|
@ -5362,7 +5362,6 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
|
||||
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 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
|
||||
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;
|
||||
|
||||
|
@ -448,9 +448,7 @@ public:
|
||||
Uint16 totalAttrReceived;
|
||||
Uint16 fragCopyCreation;
|
||||
Uint16 noOfKeyAttr;
|
||||
Uint16 noOfNewAttr;
|
||||
Uint16 noOfCharsets;
|
||||
Uint16 noOfAttributeGroups;
|
||||
Uint16 lh3DistrBits;
|
||||
Uint16 tableType;
|
||||
Uint16 primaryTableId;
|
||||
|
@ -1007,7 +1007,6 @@ void Dblqh::execLQHFRAGREQ(Signal* signal)
|
||||
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 @@ void Dblqh::execLQHFRAGREQ(Signal* signal)
|
||||
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 @@ Dblqh::sendAddFragReq(Signal* signal)
|
||||
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 @@ Dblqh::sendAddFragReq(Signal* signal)
|
||||
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);
|
||||
|
@ -53,19 +53,15 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
|
||||
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 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
|
||||
|
||||
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 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal)
|
||||
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 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal)
|
||||
}
|
||||
#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)
|
||||
{
|
||||
|
@ -451,6 +451,7 @@ NdbDictionary::Table::getMaxRows() const
|
||||
return m_impl.m_max_rows;
|
||||
}
|
||||
|
||||
void
|
||||
NdbDictionary::Table::setMinRows(Uint64 minRows)
|
||||
{
|
||||
m_impl.m_min_rows = minRows;
|
||||
|
@ -2067,11 +2067,11 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
|
||||
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 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user