Commit ccef8c78 authored by pekka@mysql.com's avatar pekka@mysql.com

ndb: fix rootFragId in ACC undo log

parent 947efdff
...@@ -9089,8 +9089,9 @@ void Dbacc::writeUndoHeader(Signal* signal, ...@@ -9089,8 +9089,9 @@ void Dbacc::writeUndoHeader(Signal* signal,
(UndoHeader *) &undopageptr.p->undoword[theadundoindex]; (UndoHeader *) &undopageptr.p->undoword[theadundoindex];
undoHeaderPtr->tableId = rootfragrecptr.p->mytabptr; undoHeaderPtr->tableId = rootfragrecptr.p->mytabptr;
undoHeaderPtr->rootFragId = rootfragrecptr.p->fragmentid[0]; undoHeaderPtr->rootFragId = rootfragrecptr.p->fragmentid[0] >> 1;
undoHeaderPtr->localFragId = fragrecptr.p->myfid; undoHeaderPtr->localFragId = fragrecptr.p->myfid;
ndbrequire((undoHeaderPtr->localFragId >> 1) == undoHeaderPtr->rootFragId);
Uint32 Ttmp = cundoinfolength; Uint32 Ttmp = cundoinfolength;
Ttmp = (Ttmp << 4) + pageType; Ttmp = (Ttmp << 4) + pageType;
Ttmp = Ttmp << 14; Ttmp = Ttmp << 14;
...@@ -10200,6 +10201,7 @@ void Dbacc::srDoUndoLab(Signal* signal) ...@@ -10200,6 +10201,7 @@ void Dbacc::srDoUndoLab(Signal* signal)
// ROOT FRAGMENT ID // ROOT FRAGMENT ID
tfid = undoHeaderPtr->rootFragId; tfid = undoHeaderPtr->rootFragId;
ndbrequire((undoHeaderPtr->localFragId >> 1) == undoHeaderPtr->rootFragId);
if (!getrootfragmentrec(signal, rootfragrecptr, tfid)) { if (!getrootfragmentrec(signal, rootfragrecptr, tfid)) {
jam(); jam();
/*---------------------------------------------------------------------*/ /*---------------------------------------------------------------------*/
...@@ -10209,7 +10211,10 @@ void Dbacc::srDoUndoLab(Signal* signal) ...@@ -10209,7 +10211,10 @@ void Dbacc::srDoUndoLab(Signal* signal)
creadyUndoaddress = cprevUndoaddress; creadyUndoaddress = cprevUndoaddress;
// PREVIOUS UNDO LOG RECORD FOR ALL FRAGMENTS // PREVIOUS UNDO LOG RECORD FOR ALL FRAGMENTS
cprevUndoaddress = undoHeaderPtr->prevUndoAddress; cprevUndoaddress = undoHeaderPtr->prevUndoAddress;
undoNext2Lab(signal); undoNext2Lab(signal);
#ifdef VM_TRACE
ndbout_c("ignoring root fid %d", (int)tfid);
#endif
return; return;
}//if }//if
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment