Commit 8c0350c0 authored by jonas@perch.ndb.mysql.com's avatar jonas@perch.ndb.mysql.com

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-jonas

into  perch.ndb.mysql.com:/home/jonas/src/51-jonas
parents cfeef33c 9df78327
...@@ -358,7 +358,6 @@ struct Fragmentrec { ...@@ -358,7 +358,6 @@ struct Fragmentrec {
// List of lock owners and list of lock waiters to support LCP handling // List of lock owners and list of lock waiters to support LCP handling
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Uint32 lockOwnersList; Uint32 lockOwnersList;
Uint32 m_current_sequence_no;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// References to Directory Ranges (which in turn references directories, which // References to Directory Ranges (which in turn references directories, which
...@@ -478,7 +477,6 @@ struct Fragmentrec { ...@@ -478,7 +477,6 @@ struct Fragmentrec {
/* OPERATIONREC */ /* OPERATIONREC */
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
struct Operationrec { struct Operationrec {
Uint32 keydata[8];
Uint32 localdata[2]; Uint32 localdata[2];
Uint32 elementIsforward; Uint32 elementIsforward;
Uint32 elementPage; Uint32 elementPage;
...@@ -488,23 +486,17 @@ struct Operationrec { ...@@ -488,23 +486,17 @@ struct Operationrec {
Uint32 hashvaluePart; Uint32 hashvaluePart;
Uint32 hashValue; Uint32 hashValue;
Uint32 insertDeleteLen; Uint32 insertDeleteLen;
Uint32 keyinfoPage;
Uint32 nextLockOwnerOp; Uint32 nextLockOwnerOp;
Uint32 nextOp; Uint32 nextOp;
Uint32 nextParallelQue; Uint32 nextParallelQue;
Uint32 nextQueOp;
Uint32 nextSerialQue; Uint32 nextSerialQue;
Uint32 prevOp; Uint32 prevOp;
Uint32 prevLockOwnerOp; Uint32 prevLockOwnerOp;
Uint32 prevParallelQue; Uint32 prevParallelQue;
Uint32 prevQueOp;
Uint32 prevSerialQue; Uint32 prevSerialQue;
Uint32 scanRecPtr; Uint32 scanRecPtr;
Uint32 transId1; Uint32 transId1;
Uint32 transId2; Uint32 transId2;
Uint32 longPagePtr;
Uint32 longKeyPageIndex;
Uint32 m_sequence_no;
State opState; State opState;
Uint32 userptr; Uint32 userptr;
State transactionstate; State transactionstate;
......
...@@ -974,31 +974,19 @@ void Dbacc::initOpRec(Signal* signal) ...@@ -974,31 +974,19 @@ void Dbacc::initOpRec(Signal* signal)
operationRecPtr.p->fragptr = fragrecptr.i; operationRecPtr.p->fragptr = fragrecptr.i;
operationRecPtr.p->nextParallelQue = RNIL; operationRecPtr.p->nextParallelQue = RNIL;
operationRecPtr.p->prevParallelQue = RNIL; operationRecPtr.p->prevParallelQue = RNIL;
operationRecPtr.p->prevQueOp = RNIL;
operationRecPtr.p->nextQueOp = RNIL;
operationRecPtr.p->nextSerialQue = RNIL; operationRecPtr.p->nextSerialQue = RNIL;
operationRecPtr.p->prevSerialQue = RNIL; operationRecPtr.p->prevSerialQue = RNIL;
operationRecPtr.p->elementPage = RNIL; operationRecPtr.p->elementPage = RNIL;
operationRecPtr.p->keyinfoPage = RNIL;
operationRecPtr.p->lockOwner = ZFALSE; operationRecPtr.p->lockOwner = ZFALSE;
operationRecPtr.p->insertIsDone = ZFALSE; operationRecPtr.p->insertIsDone = ZFALSE;
operationRecPtr.p->elementIsDisappeared = ZFALSE; operationRecPtr.p->elementIsDisappeared = ZFALSE;
operationRecPtr.p->insertDeleteLen = fragrecptr.p->elementLength; operationRecPtr.p->insertDeleteLen = fragrecptr.p->elementLength;
operationRecPtr.p->longPagePtr = RNIL;
operationRecPtr.p->longKeyPageIndex = RNIL;
operationRecPtr.p->scanRecPtr = RNIL; operationRecPtr.p->scanRecPtr = RNIL;
// bit to mark lock operation // bit to mark lock operation
operationRecPtr.p->isAccLockReq = (Treqinfo >> 31) & 0x1; operationRecPtr.p->isAccLockReq = (Treqinfo >> 31) & 0x1;
// undo log is not run via ACCKEYREQ // undo log is not run via ACCKEYREQ
if(ERROR_INSERTED(5900) || ERROR_INSERTED(5901))
{
for(unsigned i = 0; i<8 && i<signal->theData[4]; i++){
operationRecPtr.p->keydata[i] = signal->theData[i+7];
}
}
}//Dbacc::initOpRec() }//Dbacc::initOpRec()
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
...@@ -1405,7 +1393,7 @@ void Dbacc::placeSerialQueueRead(Signal* signal) ...@@ -1405,7 +1393,7 @@ void Dbacc::placeSerialQueueRead(Signal* signal)
{ {
readWriteOpPtr.i = queOperPtr.p->nextSerialQue; readWriteOpPtr.i = queOperPtr.p->nextSerialQue;
ptrCheckGuard(readWriteOpPtr, coprecsize, operationrec); ptrCheckGuard(readWriteOpPtr, coprecsize, operationrec);
PSQR_LOOP: PSQR_LOOP:
jam(); jam();
if (readWriteOpPtr.p->nextSerialQue == RNIL) { if (readWriteOpPtr.p->nextSerialQue == RNIL) {
jam(); jam();
...@@ -1596,7 +1584,7 @@ Uint32 Dbacc::placeWriteInLockQueue(Signal* signal) ...@@ -1596,7 +1584,7 @@ Uint32 Dbacc::placeWriteInLockQueue(Signal* signal)
void Dbacc::placeSerialQueueWrite(Signal* signal) void Dbacc::placeSerialQueueWrite(Signal* signal)
{ {
readWriteOpPtr = queOperPtr; readWriteOpPtr = queOperPtr;
PSQW_LOOP: PSQW_LOOP:
if (readWriteOpPtr.p->nextSerialQue == RNIL) { if (readWriteOpPtr.p->nextSerialQue == RNIL) {
jam(); jam();
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
...@@ -1642,13 +1630,6 @@ void Dbacc::placeSerialQueueWrite(Signal* signal) ...@@ -1642,13 +1630,6 @@ void Dbacc::placeSerialQueueWrite(Signal* signal)
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
void Dbacc::acckeyref1Lab(Signal* signal, Uint32 result_code) void Dbacc::acckeyref1Lab(Signal* signal, Uint32 result_code)
{ {
if (operationRecPtr.p->keyinfoPage != RNIL) {
jam();
rpPageptr.i = operationRecPtr.p->keyinfoPage;
ptrCheckGuard(rpPageptr, cpagesize, page8);
releasePage(signal);
operationRecPtr.p->keyinfoPage = RNIL;
}//if
operationRecPtr.p->transactionstate = WAIT_COMMIT_ABORT; operationRecPtr.p->transactionstate = WAIT_COMMIT_ABORT;
/* ************************<< */ /* ************************<< */
/* ACCKEYREF */ /* ACCKEYREF */
...@@ -4042,12 +4023,9 @@ void Dbacc::insertLockOwnersList(Signal* signal, ...@@ -4042,12 +4023,9 @@ void Dbacc::insertLockOwnersList(Signal* signal,
insOperPtr.p->lockOwner = ZTRUE; insOperPtr.p->lockOwner = ZTRUE;
insOperPtr.p->prevLockOwnerOp = RNIL; insOperPtr.p->prevLockOwnerOp = RNIL;
tmpOperPtr.i = fragrecptr.p->lockOwnersList; tmpOperPtr.i = fragrecptr.p->lockOwnersList;
const Uint32 seq = fragrecptr.p->m_current_sequence_no;
insOperPtr.p->nextLockOwnerOp = tmpOperPtr.i; insOperPtr.p->nextLockOwnerOp = tmpOperPtr.i;
insOperPtr.p->m_sequence_no = seq;
fragrecptr.p->lockOwnersList = insOperPtr.i; fragrecptr.p->lockOwnersList = insOperPtr.i;
fragrecptr.p->m_current_sequence_no = seq+1;
if (tmpOperPtr.i == RNIL) { if (tmpOperPtr.i == RNIL) {
return; return;
} else { } else {
...@@ -6016,9 +5994,6 @@ void Dbacc::initScanOpRec(Signal* signal) ...@@ -6016,9 +5994,6 @@ void Dbacc::initScanOpRec(Signal* signal)
operationRecPtr.p->prevParallelQue = RNIL; operationRecPtr.p->prevParallelQue = RNIL;
operationRecPtr.p->nextSerialQue = RNIL; operationRecPtr.p->nextSerialQue = RNIL;
operationRecPtr.p->prevSerialQue = RNIL; operationRecPtr.p->prevSerialQue = RNIL;
operationRecPtr.p->prevQueOp = RNIL;
operationRecPtr.p->nextQueOp = RNIL;
operationRecPtr.p->keyinfoPage = RNIL; // Safety precaution
operationRecPtr.p->transId1 = scanPtr.p->scanTrid1; operationRecPtr.p->transId1 = scanPtr.p->scanTrid1;
operationRecPtr.p->transId2 = scanPtr.p->scanTrid2; operationRecPtr.p->transId2 = scanPtr.p->scanTrid2;
operationRecPtr.p->lockOwner = ZFALSE; operationRecPtr.p->lockOwner = ZFALSE;
...@@ -6038,7 +6013,6 @@ void Dbacc::initScanOpRec(Signal* signal) ...@@ -6038,7 +6013,6 @@ void Dbacc::initScanOpRec(Signal* signal)
tisoLocalPtr = tisoLocalPtr + tisoIsforward; tisoLocalPtr = tisoLocalPtr + tisoIsforward;
}//for }//for
arrGuard(tisoLocalPtr, 2048); arrGuard(tisoLocalPtr, 2048);
operationRecPtr.p->keydata[0] = isoPageptr.p->word32[tisoLocalPtr];
operationRecPtr.p->tupkeylen = fragrecptr.p->keyLength; operationRecPtr.p->tupkeylen = fragrecptr.p->keyLength;
operationRecPtr.p->xfrmtupkeylen = 0; // not used operationRecPtr.p->xfrmtupkeylen = 0; // not used
}//Dbacc::initScanOpRec() }//Dbacc::initScanOpRec()
...@@ -7412,21 +7386,18 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal) ...@@ -7412,21 +7386,18 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal)
infoEvent("fid=%d, fragptr=%d, hashvaluePart=%d ", infoEvent("fid=%d, fragptr=%d, hashvaluePart=%d ",
tmpOpPtr.p->fid, tmpOpPtr.p->fragptr, tmpOpPtr.p->fid, tmpOpPtr.p->fragptr,
tmpOpPtr.p->hashvaluePart); tmpOpPtr.p->hashvaluePart);
infoEvent("hashValue=%d, insertDeleteLen=%d, keyinfoPage=%d ", infoEvent("hashValue=%d, insertDeleteLen=%d",
tmpOpPtr.p->hashValue, tmpOpPtr.p->insertDeleteLen, tmpOpPtr.p->hashValue, tmpOpPtr.p->insertDeleteLen);
tmpOpPtr.p->keyinfoPage);
infoEvent("nextLockOwnerOp=%d, nextOp=%d, nextParallelQue=%d ", infoEvent("nextLockOwnerOp=%d, nextOp=%d, nextParallelQue=%d ",
tmpOpPtr.p->nextLockOwnerOp, tmpOpPtr.p->nextOp, tmpOpPtr.p->nextLockOwnerOp, tmpOpPtr.p->nextOp,
tmpOpPtr.p->nextParallelQue); tmpOpPtr.p->nextParallelQue);
infoEvent("nextQueOp=%d, nextSerialQue=%d, prevOp=%d ", infoEvent("nextSerialQue=%d, prevOp=%d ",
tmpOpPtr.p->nextQueOp, tmpOpPtr.p->nextSerialQue, tmpOpPtr.p->nextSerialQue,
tmpOpPtr.p->prevOp); tmpOpPtr.p->prevOp);
infoEvent("prevLockOwnerOp=%d, prevParallelQue=%d, prevQueOp=%d ", infoEvent("prevLockOwnerOp=%d, prevParallelQue=%d",
tmpOpPtr.p->prevLockOwnerOp, tmpOpPtr.p->nextParallelQue, tmpOpPtr.p->prevLockOwnerOp, tmpOpPtr.p->nextParallelQue);
tmpOpPtr.p->prevQueOp); infoEvent("prevSerialQue=%d, scanRecPtr=%d",
infoEvent("prevSerialQue=%d, scanRecPtr=%d, longPagePtr=%d ", tmpOpPtr.p->prevSerialQue, tmpOpPtr.p->scanRecPtr);
tmpOpPtr.p->prevSerialQue, tmpOpPtr.p->scanRecPtr,
tmpOpPtr.p->longPagePtr);
infoEvent("transactionstate=%d, elementIsDisappeared=%d, insertIsDone=%d ", infoEvent("transactionstate=%d, elementIsDisappeared=%d, insertIsDone=%d ",
tmpOpPtr.p->transactionstate, tmpOpPtr.p->elementIsDisappeared, tmpOpPtr.p->transactionstate, tmpOpPtr.p->elementIsDisappeared,
tmpOpPtr.p->insertIsDone); tmpOpPtr.p->insertIsDone);
......
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