Commit d7cc8d40 authored by unknown's avatar unknown

ndb - bug#24331

  Make sure LCP scan record is correct initialized


storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  Init ScanOp
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
  And set correct pointers...
parent 32510f62
...@@ -329,6 +329,7 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -329,6 +329,7 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal)
ScanOpPtr lcp; ScanOpPtr lcp;
ndbrequire(c_scanOpPool.seize(lcp)); ndbrequire(c_scanOpPool.seize(lcp));
new (lcp.p) ScanOp();
c_lcp_scan_op= lcp.i; c_lcp_scan_op= lcp.i;
czero = 0; czero = 0;
......
...@@ -87,6 +87,7 @@ Dbtup::execACC_SCANREQ(Signal* signal) ...@@ -87,6 +87,7 @@ Dbtup::execACC_SCANREQ(Signal* signal)
ndbrequire(frag.m_lcp_scan_op == c_lcp_scan_op); ndbrequire(frag.m_lcp_scan_op == c_lcp_scan_op);
c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op);
ndbrequire(scanPtr.p->m_fragPtrI == fragPtr.i);
bits |= ScanOp::SCAN_LCP; bits |= ScanOp::SCAN_LCP;
if (tablePtr.p->m_attributes[MM].m_no_of_varsize > 0) { if (tablePtr.p->m_attributes[MM].m_no_of_varsize > 0) {
bits |= ScanOp::SCAN_VS; bits |= ScanOp::SCAN_VS;
...@@ -1038,6 +1039,7 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr) ...@@ -1038,6 +1039,7 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr)
{ {
ndbrequire(fragPtr.p->m_lcp_scan_op == scanPtr.i); ndbrequire(fragPtr.p->m_lcp_scan_op == scanPtr.i);
fragPtr.p->m_lcp_scan_op = RNIL; fragPtr.p->m_lcp_scan_op = RNIL;
scanPtr.p->m_fragPtrI = RNIL;
} }
} }
...@@ -1064,7 +1066,8 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal) ...@@ -1064,7 +1066,8 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal)
frag.m_lcp_scan_op = c_lcp_scan_op; frag.m_lcp_scan_op = c_lcp_scan_op;
ScanOpPtr scanPtr; ScanOpPtr scanPtr;
c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op);
//ndbrequire(scanPtr.p->m_fragPtrI == fragPtr.i); ? ndbrequire(scanPtr.p->m_fragPtrI == RNIL);
scanPtr.p->m_fragPtrI = fragPtr.i;
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