Skip to content

Commit e791b90

Browse files
committed
Merge ../mysql-5.5-cluster-7.2 into mysql-5.6-cluster-7.3
2 parents a69b9a2 + 7e71083 commit e791b90

File tree

2 files changed

+63
-7
lines changed

2 files changed

+63
-7
lines changed

storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10356,6 +10356,11 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1035610356
return;
1035710357
}
1035810358

10359+
/**
10360+
* First stage response / queueing handled here
10361+
* Actual processing is done in doGET_TABINFOREQ()
10362+
*/
10363+
1035910364
GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
1036010365

1036110366
if (ERROR_INSERTED(6215) &&
@@ -10416,6 +10421,18 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1041610421
return;
1041710422
}
1041810423

10424+
/* Not busy, cannot be anything queued... */
10425+
ndbrequire(c_gettabinforeq_q.isEmpty());
10426+
10427+
doGET_TABINFOREQ(signal);
10428+
} // execGET_TABINFOREQ()
10429+
10430+
void
10431+
Dbdict::doGET_TABINFOREQ(Signal* signal)
10432+
{
10433+
jam();
10434+
GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
10435+
1041910436
SectionHandle handle(this, signal);
1042010437

1042110438
if(ERROR_INSERTED(6216))
@@ -10475,7 +10492,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1047510492

1047610493
// If istable/index, allow ADD_STARTED (not to ref)
1047710494

10478-
D("execGET_TABINFOREQ" << V(transId) << " " << *objEntry);
10495+
D("doGET_TABINFOREQ" << V(transId) << " " << *objEntry);
1047910496

1048010497
if (transId != 0 && transId == objEntry->m_transId)
1048110498
{
@@ -10496,6 +10513,15 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1049610513
}
1049710514
}
1049810515

10516+
/**
10517+
* From this point we agree to process this request
10518+
* and are 'busy' w.r.t. GETTABINFOREQ.
10519+
* Further incoming GETTABINFOREQ signals will
10520+
* be queued or rejected.
10521+
* When we finish processing this one, we must
10522+
* start any queued req.
10523+
*/
10524+
1049910525
c_retrieveRecord.busyState = true;
1050010526
c_retrieveRecord.blockRef = req->senderRef;
1050110527
c_retrieveRecord.m_senderData = req->senderData;
@@ -10572,7 +10598,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1057210598
signal->theData[2] = objEntry->m_tableType;
1057310599
signal->theData[3] = c_retrieveRecord.retrievePage;
1057410600
sendSignal(reference(), GSN_CONTINUEB, signal, len, JBB);
10575-
}//execGET_TABINFOREQ()
10601+
}//doGET_TABINFOREQ()
1057610602

1057710603
void Dbdict::sendGetTabResponse(Signal* signal)
1057810604
{
@@ -32308,11 +32334,39 @@ Dbdict::startNextGetTabInfoReq(Signal* signal)
3230832334
*/
3230932335
ndbrequire(c_gettabinforeq_q.deqReq(signal));
3231032336

32337+
signal->header.theLength = GetTabInfoReq::SignalLength;
32338+
3231132339
c_retrieveRecord.busyState = false;
3231232340

32313-
/* Execute...using EXECUTE_DIRECT to get signal trace */
32314-
EXECUTE_DIRECT(number(),
32315-
GSN_GET_TABINFOREQ,
32316-
signal,
32317-
GetTabInfoReq::SignalLength);
32341+
/**
32342+
* Todo : Queue + jam signal id to indicate which req
32343+
* we are starting in trace file
32344+
*/
32345+
doGET_TABINFOREQ(signal);
32346+
32347+
if (!c_retrieveRecord.busyState)
32348+
{
32349+
jam();
32350+
/* That GET_TABINFOREQ is done with no
32351+
* blocking work.
32352+
* Any more on the queue?
32353+
*/
32354+
if (!c_gettabinforeq_q.isEmpty())
32355+
{
32356+
jam();
32357+
/* We will trigger starting the next
32358+
* entry.
32359+
*/
32360+
/* TODO : Option to do immediate DIRECT
32361+
* exec of next req up to limit of n
32362+
*/
32363+
32364+
/* Stop queue-jumpers */
32365+
c_retrieveRecord.busyState = true;
32366+
32367+
signal->theData[0] = ZNEXT_GET_TAB_REQ;
32368+
sendSignal(reference(), GSN_CONTINUEB, signal,
32369+
1, JBB);
32370+
}
32371+
}
3231832372
}

storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ class Dbdict: public SimulatedBlock {
15271527

15281528
Uint32 computeChecksum(const Uint32 * src, Uint32 len);
15291529

1530+
void doGET_TABINFOREQ(Signal* signal);
1531+
15301532

15311533
/* ----------------------------------------------------------------------- */
15321534
// Node References

0 commit comments

Comments
 (0)