diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 7e8db77458a0c501564cb7267219ca8efb195194..37c842679ae89ca0ad41c99127e1e58c4de43dbc 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -2915,6 +2915,17 @@ Dbdih::nr_start_fragment(Signal* signal, takeOverPtr.p->toCurrentTabref, takeOverPtr.p->toCurrentFragid); replicaPtr.p->lcpIdStarted = 0; + BlockReference ref = calcLqhBlockRef(takeOverPtr.p->toStartingNode); + StartFragReq *req = (StartFragReq *)signal->getDataPtrSend(); + req->userPtr = 0; + req->userRef = reference(); + req->lcpNo = ZNIL; + req->lcpId = 0; + req->tableId = takeOverPtr.p->toCurrentTabref; + req->fragId = takeOverPtr.p->toCurrentFragid; + req->noOfLogNodes = 0; + sendSignal(ref, GSN_START_FRAGREQ, signal, + StartFragReq::SignalLength, JBB); } else { diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 0be59fdf96b9ac6e30d6b4abb4abb1e557852025..e4764698f5b95a6b694066f15bb8b11540e982ab 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -13835,6 +13835,7 @@ void Dblqh::execSTART_FRAGREQ(Signal* signal) Uint32 lcpNo = startFragReq->lcpNo; Uint32 noOfLogNodes = startFragReq->noOfLogNodes; Uint32 lcpId = startFragReq->lcpId; + ndbrequire(noOfLogNodes <= 4); fragptr.p->fragStatus = Fragrecord::CRASH_RECOVERING; fragptr.p->srBlockref = startFragReq->userRef; @@ -13889,7 +13890,16 @@ void Dblqh::execSTART_FRAGREQ(Signal* signal) signal->theData[1] = fragId; sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB); } - + + if (getNodeState().getNodeRestartInProgress()) + { + jam(); + fragptr.p->fragStatus = Fragrecord::ACTIVE_CREATION; + } + + c_tup->disk_restart_mark_no_lcp(tabptr.i, fragId); + jamEntry(); + return; }//if @@ -16712,8 +16722,8 @@ void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data, ccurrentGcprec = RNIL; caddNodeState = ZFALSE; cstartRecReq = ZFALSE; - cnewestGci = ~0; - cnewestCompletedGci = ~0; + cnewestGci = 0; + cnewestCompletedGci = 0; crestartOldestGci = 0; crestartNewestGci = 0; csrPhaseStarted = ZSR_NO_PHASE_STARTED; diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 408925e4103c219ba55a6d6af202327069214524..357dec6fde78cd0309ba1da7c8449469edf92207 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -2710,6 +2710,8 @@ public: Ptr<Extent_info> m_extent_ptr; Local_key m_key; }; + + void disk_restart_mark_no_lcp(Uint32 table, Uint32 frag); private: void disk_restart_undo_next(Signal*); diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp index 5716ce61be23df889e6e4fb33396deda0ca23c5c..54abbf18664bdf3ee8dcebf17ca2f90da4163624 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp @@ -1421,6 +1421,13 @@ Dbtup::disk_restart_undo_next(Signal* signal) sendSignal(LGMAN_REF, GSN_CONTINUEB, signal, 1, JBB); } +void +Dbtup::disk_restart_mark_no_lcp(Uint32 tableId, Uint32 fragId) +{ + jamEntry(); + disk_restart_undo_lcp(tableId, fragId, Fragrecord::UC_CREATE); +} + void Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag) { diff --git a/storage/ndb/src/kernel/blocks/pgman.cpp b/storage/ndb/src/kernel/blocks/pgman.cpp index fce35c89ad8baf6615787796af5a79cbd859a01d..af648c71253dd6520e85ed108cdfe3c108e2fda8 100644 --- a/storage/ndb/src/kernel/blocks/pgman.cpp +++ b/storage/ndb/src/kernel/blocks/pgman.cpp @@ -1257,6 +1257,8 @@ Pgman::process_lcp(Signal* signal) void Pgman::process_lcp_locked(Signal* signal, Ptr<Page_entry> ptr) { + CRASH_INSERTION(11006); + ptr.p->m_last_lcp = m_last_lcp; if (ptr.p->m_state & Page_entry::DIRTY) { @@ -2350,6 +2352,11 @@ Pgman::execDUMP_STATE_ORD(Signal* signal) { g_dbg_lcp = ~g_dbg_lcp; } + + if (signal->theData[0] == 11006) + { + SET_ERROR_INSERT_VALUE(11006); + } } // page cache client