Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-01-22 17:49:14+01:00, jonas@eel.(none) +2 -0
ndb - bug#25755
make sure subscriber is reomved from list, when n_subscribers is decreased
(recommit mysql-5.1-wl2325-5.0)
storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-01-22 17:49:11+01:00,
jonas@eel.(none) +39 -7
ndb - bug#25755
make sure subscriber is reomved from list, when n_subscribers is decreased
storage/ndb/src/kernel/blocks/suma/Suma.hpp@stripped, 2007-01-22 17:49:11+01:00,
jonas@eel.(none) +1 -1
ndb - bug#25755
make sure subscriber is reomved from list, when n_subscribers is decreased
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: eel.(none)
# Root: /home/jonas/src/drop5
--- 1.32/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-01-22 17:49:21 +01:00
+++ 1.33/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-01-22 17:49:21 +01:00
@@ -1372,17 +1372,26 @@
if (r)
{
+ jam();
// we have to wait getting tab info
DBUG_RETURN(1);
}
if (tabPtr.p->setupTrigger(signal, *this))
{
+ jam();
// we have to wait for triggers to be setup
DBUG_RETURN(1);
}
- completeOneSubscriber(signal, tabPtr, subbPtr);
+ int ret = completeOneSubscriber(signal, tabPtr, subbPtr);
+ if (ret == -1)
+ {
+ jam();
+ LocalDLList<Subscriber> subscribers(c_subscriberPool,
+ tabPtr.p->c_subscribers);
+ subscribers.release(subbPtr);
+ }
completeInitTable(signal, tabPtr);
DBUG_RETURN(0);
}
@@ -1455,6 +1464,20 @@
req->tableId = tableId;
DBUG_PRINT("info",("GET_TABINFOREQ id %d", req->tableId));
+
+ if (ERROR_INSERTED(13031))
+ {
+ jam();
+ CLEAR_ERROR_INSERT_VALUE;
+ GetTabInfoRef* ref = (GetTabInfoRef*)signal->getDataPtrSend();
+ ref->tableId = tableId;
+ ref->senderData = tabPtr.i;
+ ref->errorCode = GetTabInfoRef::TableNotDefined;
+ sendSignal(reference(), GSN_GET_TABINFOREF, signal,
+ GetTabInfoRef::SignalLength, JBB);
+ DBUG_RETURN(1);
+ }
+
sendSignal(DBDICT_REF, GSN_GET_TABINFOREQ, signal,
GetTabInfoReq::SignalLength, JBB);
DBUG_RETURN(1);
@@ -1468,7 +1491,7 @@
DBUG_RETURN(0);
}
-void
+int
Suma::completeOneSubscriber(Signal *signal, TablePtr tabPtr, SubscriberPtr subbPtr)
{
jam();
@@ -1478,19 +1501,22 @@
(c_startup.m_restart_server_node_id == 0 ||
tabPtr.p->m_state != Table::DROPPED))
{
+ jam();
sendSubStartRef(signal,subbPtr,tabPtr.p->m_error,
SubscriptionData::TableData);
tabPtr.p->n_subscribers--;
+ DBUG_RETURN(-1);
}
else
{
+ jam();
SubscriptionPtr subPtr;
c_subscriptions.getPtr(subPtr, subbPtr.p->m_subPtrI);
subPtr.p->m_table_ptrI= tabPtr.i;
sendSubStartComplete(signal,subbPtr, m_last_complete_gci + 3,
SubscriptionData::TableData);
}
- DBUG_VOID_RETURN;
+ DBUG_RETURN(0);
}
void
@@ -1503,11 +1529,17 @@
LocalDLList<Subscriber> subscribers(c_subscriberPool,
tabPtr.p->c_subscribers);
SubscriberPtr subbPtr;
- for(subscribers.first(subbPtr);
- !subbPtr.isNull();
- subscribers.next(subbPtr))
+ for(subscribers.first(subbPtr); !subbPtr.isNull();)
{
- completeOneSubscriber(signal, tabPtr, subbPtr);
+ jam();
+ Ptr<Subscriber> tmp = subbPtr;
+ subscribers.next(subbPtr);
+ int ret = completeOneSubscriber(signal, tabPtr, tmp);
+ if (ret == -1)
+ {
+ jam();
+ subscribers.release(tmp);
+ }
}
}
DBUG_VOID_RETURN;
--- 1.9/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2007-01-22 17:49:21 +01:00
+++ 1.10/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2007-01-22 17:49:21 +01:00
@@ -203,7 +203,7 @@
SubscriberPtr subbPtr);
int initTable(Signal *signal,Uint32 tableId, TablePtr &tabPtr);
- void completeOneSubscriber(Signal* signal, TablePtr tabPtr, SubscriberPtr subbPtr);
+ int completeOneSubscriber(Signal* signal, TablePtr tabPtr, SubscriberPtr subbPtr);
void completeAllSubscribers(Signal* signal, TablePtr tabPtr);
void completeInitTable(Signal* signal, TablePtr tabPtr);
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2093) BUG#25755 | jonas | 22 Jan |