Commit eff09110 authored by unknown's avatar unknown

ndb - bug#34033

  remove LCP-snapshot from MM-tables,
  removing possibility of spurious 899 on MM-tables


storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
  dont run LCP-snapshot on pure MM-tables,
  this is implemented by not setting frag.m_lcp_scan_op
  which will make TUP_COMMIT do nothing
parent e2ba0ab9
...@@ -53,7 +53,14 @@ Dbtup::execACC_SCANREQ(Signal* signal) ...@@ -53,7 +53,14 @@ Dbtup::execACC_SCANREQ(Signal* signal)
// flags // flags
Uint32 bits = 0; Uint32 bits = 0;
if (!AccScanReq::getLcpScanFlag(req->requestInfo))
if (AccScanReq::getLcpScanFlag(req->requestInfo))
{
jam();
bits |= ScanOp::SCAN_LCP;
c_scanOpPool.getPtr(scanPtr, c_lcp_scan_op);
}
else
{ {
// seize from pool and link to per-fragment list // seize from pool and link to per-fragment list
LocalDLList<ScanOp> list(c_scanOpPool, frag.m_scanList); LocalDLList<ScanOp> list(c_scanOpPool, frag.m_scanList);
...@@ -61,6 +68,7 @@ Dbtup::execACC_SCANREQ(Signal* signal) ...@@ -61,6 +68,7 @@ Dbtup::execACC_SCANREQ(Signal* signal)
jam(); jam();
break; break;
} }
}
if (!AccScanReq::getNoDiskScanFlag(req->requestInfo) if (!AccScanReq::getNoDiskScanFlag(req->requestInfo)
&& tablePtr.p->m_no_of_disk_attributes) && tablePtr.p->m_no_of_disk_attributes)
...@@ -81,17 +89,12 @@ Dbtup::execACC_SCANREQ(Signal* signal) ...@@ -81,17 +89,12 @@ Dbtup::execACC_SCANREQ(Signal* signal)
else else
bits |= ScanOp::SCAN_LOCK_EX; bits |= ScanOp::SCAN_LOCK_EX;
} }
} else {
jam();
// LCP scan and disk
ndbrequire(frag.m_lcp_scan_op == c_lcp_scan_op); if (AccScanReq::getLcpScanFlag(req->requestInfo))
c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); {
ndbrequire(scanPtr.p->m_fragPtrI == fragPtr.i); jam();
bits |= ScanOp::SCAN_LCP; ndbrequire((bits & ScanOp::SCAN_DD) == 0);
if (tablePtr.p->m_attributes[MM].m_no_of_varsize > 0) { ndbrequire((bits & ScanOp::SCAN_LOCK) == 0);
bits |= ScanOp::SCAN_VS;
}
} }
bits |= AccScanReq::getNRScanFlag(req->requestInfo) ? ScanOp::SCAN_NR : 0; bits |= AccScanReq::getNRScanFlag(req->requestInfo) ? ScanOp::SCAN_NR : 0;
...@@ -1107,16 +1110,17 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr) ...@@ -1107,16 +1110,17 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr)
fragPtr.i = scanPtr.p->m_fragPtrI; fragPtr.i = scanPtr.p->m_fragPtrI;
ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord); ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord);
if(! (scanPtr.p->m_bits & ScanOp::SCAN_LCP)) if(scanPtr.p->m_bits & ScanOp::SCAN_LCP)
{ {
LocalDLList<ScanOp> list(c_scanOpPool, fragPtr.p->m_scanList); jam();
list.release(scanPtr); fragPtr.p->m_lcp_scan_op = RNIL;
scanPtr.p->m_fragPtrI = RNIL;
} }
else else
{ {
ndbrequire(fragPtr.p->m_lcp_scan_op == scanPtr.i); jam();
fragPtr.p->m_lcp_scan_op = RNIL; LocalDLList<ScanOp> list(c_scanOpPool, fragPtr.p->m_scanList);
scanPtr.p->m_fragPtrI = RNIL; list.release(scanPtr);
} }
} }
...@@ -1129,6 +1133,8 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal) ...@@ -1129,6 +1133,8 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal)
tablePtr.i = req->tableId; tablePtr.i = req->tableId;
ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec);
if (tablePtr.p->m_no_of_disk_attributes)
{
jam(); jam();
FragrecordPtr fragPtr; FragrecordPtr fragPtr;
Uint32 fragId = req->fragmentId; Uint32 fragId = req->fragmentId;
...@@ -1146,4 +1152,5 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal) ...@@ -1146,4 +1152,5 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal)
scanFirst(signal, scanPtr); scanFirst(signal, scanPtr);
scanPtr.p->m_state = ScanOp::First; scanPtr.p->m_state = ScanOp::First;
}
} }
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