Commit 93a7c527 authored by jonas@eel.(none)'s avatar jonas@eel.(none)

ndb dd -

  sync create tabe to undo log, so that undo for other table is not run after SR
parent c71c156c
......@@ -2632,6 +2632,7 @@ private:
Uint32 gci, Uint32 logfile_group_id);
void undo_createtable_callback(Signal* signal, Uint32 opPtrI, Uint32 unused);
void undo_createtable_logsync_callback(Signal* signal, Uint32, Uint32);
void disk_page_set_dirty(Ptr<Page>);
void restart_setup_page(Disk_alloc_info&, Ptr<Page>);
......
......@@ -605,7 +605,7 @@ Dbtup::undo_createtable_callback(Signal* signal, Uint32 opPtrI, Uint32 unused)
getFragmentrec(regFragPtr, fragOperPtr.p->fragidFrag, regTabPtr.p);
ndbrequire(regFragPtr.i != RNIL);
Logfile_client lsman(this, c_lgman, regFragPtr.p->m_logfile_group_id);
Logfile_client lgman(this, c_lgman, regFragPtr.p->m_logfile_group_id);
Disk_undo::Create create;
create.m_type_length= Disk_undo::UNDO_CREATE << 16 | (sizeof(create) >> 2);
......@@ -613,14 +613,39 @@ Dbtup::undo_createtable_callback(Signal* signal, Uint32 opPtrI, Uint32 unused)
Logfile_client::Change c[1] = {{ &create, sizeof(create) >> 2 } };
Uint64 lsn= lsman.add_entry(c, 1);
Uint64 lsn= lgman.add_entry(c, 1);
Logfile_client::Request req;
req.m_callback.m_callbackData= fragOperPtr.i;
req.m_callback.m_callbackFunction =
safe_cast(&Dbtup::undo_createtable_logsync_callback);
int ret = lgman.sync_lsn(signal, lsn, &req, 0);
switch(ret){
case 0:
return;
default:
ndbout_c("ret: %d", ret);
ndbrequire(false);
}
}
void
Dbtup::undo_createtable_logsync_callback(Signal* signal, Uint32 ptrI,
Uint32 res)
{
jamEntry();
FragoperrecPtr fragOperPtr;
fragOperPtr.i= ptrI;
ptrCheckGuard(fragOperPtr, cnoOfFragoprec, fragoperrec);
signal->theData[0] = fragOperPtr.p->lqhPtrFrag;
signal->theData[1] = 1;
sendSignal(fragOperPtr.p->lqhBlockrefFrag, GSN_TUP_ADD_ATTCONF,
signal, 2, JBB);
releaseFragoperrec(fragOperPtr);
releaseFragoperrec(fragOperPtr);
}
/*
......
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