mirror of
https://github.com/MariaDB/server.git
synced 2026-04-25 09:45:31 +02:00
bug#18040 - ndb online index build
This commit is contained in:
parent
d56ca9c7e6
commit
3d3d366db7
3 changed files with 17 additions and 8 deletions
|
|
@ -1092,6 +1092,7 @@ Suma::execSUB_CREATE_REQ(Signal* signal)
|
|||
subPtr.p->m_table_ptrI = RNIL;
|
||||
subPtr.p->m_state = Subscription::DEFINED;
|
||||
subPtr.p->n_subscribers = 0;
|
||||
subPtr.p->m_current_sync_ptrI = RNIL;
|
||||
|
||||
fprintf(stderr, "table %d options %x\n", subPtr.p->m_tableId, subPtr.p->m_options);
|
||||
DBUG_PRINT("info",("Added: key.m_subscriptionId: %u, key.m_subscriptionKey: %u",
|
||||
|
|
@ -1163,13 +1164,15 @@ Suma::execSUB_SYNC_REQ(Signal* signal)
|
|||
DBUG_PRINT("info",("c_syncPool size: %d free: %d",
|
||||
c_syncPool.getSize(),
|
||||
c_syncPool.getNoOfFree()));
|
||||
new (syncPtr.p) Ptr<SyncRecord>;
|
||||
|
||||
syncPtr.p->m_senderRef = req->senderRef;
|
||||
syncPtr.p->m_senderData = req->senderData;
|
||||
syncPtr.p->m_subscriptionPtrI = subPtr.i;
|
||||
syncPtr.p->ptrI = syncPtr.i;
|
||||
syncPtr.p->m_error = 0;
|
||||
|
||||
subPtr.p->m_current_sync_ptrI = syncPtr.i;
|
||||
|
||||
{
|
||||
jam();
|
||||
syncPtr.p->m_tableList.append(&subPtr.p->m_tableId, 1);
|
||||
|
|
@ -2059,7 +2062,7 @@ Suma::execSUB_SYNC_CONTINUE_CONF(Signal* signal){
|
|||
ndbrequire(c_subscriptions.find(subPtr, key));
|
||||
|
||||
ScanFragNextReq * req = (ScanFragNextReq *)signal->getDataPtrSend();
|
||||
req->senderData = subPtr.i;
|
||||
req->senderData = subPtr.p->m_current_sync_ptrI;
|
||||
req->closeFlag = 0;
|
||||
req->transId1 = 0;
|
||||
req->transId2 = (SUMA << 20) + (getOwnNodeId() << 8);
|
||||
|
|
@ -2098,6 +2101,12 @@ Suma::SyncRecord::completeScan(Signal* signal, int error)
|
|||
#endif
|
||||
|
||||
release();
|
||||
|
||||
Ptr<Subscription> subPtr;
|
||||
suma.c_subscriptions.getPtr(subPtr, m_subscriptionPtrI);
|
||||
ndbrequire(subPtr.p->m_current_sync_ptrI == ptrI);
|
||||
subPtr.p->m_current_sync_ptrI = RNIL;
|
||||
|
||||
suma.c_syncPool.release(ptrI);
|
||||
DBUG_PRINT("info",("c_syncPool size: %d free: %d",
|
||||
suma.c_syncPool.getSize(),
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ public:
|
|||
*/
|
||||
Uint32 m_tableId;
|
||||
Uint32 m_table_ptrI;
|
||||
Uint32 m_current_sync_ptrI;
|
||||
};
|
||||
typedef Ptr<Subscription> SubscriptionPtr;
|
||||
|
||||
|
|
@ -239,7 +240,8 @@ public:
|
|||
suma.progError(line, cause, extra);
|
||||
}
|
||||
|
||||
union { Uint32 nextPool; Uint32 nextList; Uint32 prevList; Uint32 ptrI; };
|
||||
Uint32 prevList; Uint32 ptrI;
|
||||
union { Uint32 nextPool; Uint32 nextList; };
|
||||
};
|
||||
friend struct SyncRecord;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue