mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
ndb - bug#24914
Fix start transaction with hint from ndbapi
This commit is contained in:
parent
a460d5f288
commit
6f01db2285
3 changed files with 9 additions and 4 deletions
|
@ -479,7 +479,7 @@ Dbdict::packTableIntoPages(SimpleProperties::Writer & w,
|
|||
CreateFragmentationReq::SignalLength);
|
||||
ndbrequire(signal->theData[0] == 0);
|
||||
Uint16 *data = (Uint16*)&signal->theData[25];
|
||||
Uint32 count = 2 + data[0] * data[1];
|
||||
Uint32 count = 2 + (1 + data[0]) * data[1];
|
||||
w.add(DictTabInfo::ReplicaDataLen, 2*count);
|
||||
for (Uint32 i = 0; i < count; i++)
|
||||
data[i] = htons(data[i]);
|
||||
|
|
|
@ -6728,7 +6728,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
|
|||
FragmentstorePtr fragPtr;
|
||||
ReplicaRecordPtr replicaPtr;
|
||||
getFragstore(primTabPtr.p, fragNo, fragPtr);
|
||||
fragments[count++] = c_nextLogPart++;
|
||||
fragments[count++] = fragPtr.p->m_log_part_id;
|
||||
fragments[count++] = fragPtr.p->preferredPrimary;
|
||||
for (replicaPtr.i = fragPtr.p->storedReplicas;
|
||||
replicaPtr.i != RNIL;
|
||||
|
|
|
@ -2191,9 +2191,14 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
|
|||
impl->m_replicaCount = replicaCount;
|
||||
impl->m_fragmentCount = fragCount;
|
||||
DBUG_PRINT("info", ("replicaCount=%x , fragCount=%x",replicaCount,fragCount));
|
||||
for(i = 0; i < (Uint32) (fragCount*replicaCount); i++)
|
||||
Uint32 pos = 2;
|
||||
for(i = 0; i < (Uint32) fragCount;i++)
|
||||
{
|
||||
impl->m_fragments.push_back(ntohs(tableDesc->ReplicaData[i+2]));
|
||||
pos++; // skip logpart
|
||||
for (Uint32 j = 0; j<(Uint32)replicaCount; j++)
|
||||
{
|
||||
impl->m_fragments.push_back(ntohs(tableDesc->ReplicaData[pos++]));
|
||||
}
|
||||
}
|
||||
|
||||
Uint32 topBit = (1 << 31);
|
||||
|
|
Loading…
Add table
Reference in a new issue