ndb - Add new dump 8011

which dumps all subscribers
This commit is contained in:
jonas@perch.ndb.mysql.com 2007-11-14 11:52:40 +01:00
parent 5c059f7de7
commit 166987007b

View file

@ -974,6 +974,54 @@ Suma::execDUMP_STATE_ORD(Signal* signal){
}
return;
}
if (tCase == 8011)
{
jam();
Uint32 bucket = signal->theData[1];
KeyTable<Table>::Iterator it;
if (signal->getLength() == 1)
{
jam();
bucket = 0;
infoEvent("-- Starting dump of subscribers --");
}
c_tables.next(bucket, it);
const Uint32 RT_BREAK = 16;
for(Uint32 i = 0; i<RT_BREAK || it.bucket == bucket; i++)
{
jam();
if(it.curr.i == RNIL)
{
jam();
infoEvent("-- Ending dump of subscribers --");
return;
}
infoEvent("Table: %u ver: %u #n: %u (ref,data,subscritopn)",
it.curr.p->m_tableId,
it.curr.p->m_schemaVersion,
it.curr.p->n_subscribers);
Ptr<Subscriber> ptr;
LocalDLList<Subscriber> list(c_subscriberPool, it.curr.p->c_subscribers);
for (list.first(ptr); !ptr.isNull(); list.next(ptr), i++)
{
jam();
infoEvent(" [ %x %u %u ]",
ptr.p->m_senderRef,
ptr.p->m_senderData,
ptr.p->m_subPtrI);
}
c_tables.next(it);
}
signal->theData[0] = tCase;
signal->theData[1] = it.bucket;
sendSignalWithDelay(reference(), GSN_DUMP_STATE_ORD, signal, 100, 2);
return;
}
}
/*************************************************************