From b4556894401856a297570ededd76ac59a57aa053 Mon Sep 17 00:00:00 2001 From: "jonas@perch.ndb.mysql.com" <> Date: Tue, 21 Nov 2006 14:21:11 +0100 Subject: [PATCH] ndb - bug#24331 Make sure LCP scan record is correct initialized --- storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp | 1 + storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp index 973d2f7a9ef..01326e6a353 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp @@ -329,6 +329,7 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal) ScanOpPtr lcp; ndbrequire(c_scanOpPool.seize(lcp)); + new (lcp.p) ScanOp(); c_lcp_scan_op= lcp.i; czero = 0; diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp index 3ebfbd4aaa9..38156d1453c 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp @@ -87,6 +87,7 @@ Dbtup::execACC_SCANREQ(Signal* signal) ndbrequire(frag.m_lcp_scan_op == c_lcp_scan_op); c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); + ndbrequire(scanPtr.p->m_fragPtrI == fragPtr.i); bits |= ScanOp::SCAN_LCP; if (tablePtr.p->m_attributes[MM].m_no_of_varsize > 0) { bits |= ScanOp::SCAN_VS; @@ -1038,6 +1039,7 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr) { ndbrequire(fragPtr.p->m_lcp_scan_op == scanPtr.i); fragPtr.p->m_lcp_scan_op = RNIL; + scanPtr.p->m_fragPtrI = RNIL; } } @@ -1064,8 +1066,9 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal) frag.m_lcp_scan_op = c_lcp_scan_op; ScanOpPtr scanPtr; 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); scanPtr.p->m_state = ScanOp::First; }