Commit b50f61e1 authored by unknown's avatar unknown

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb

parents 37feda25 ec8a3c07
...@@ -119,7 +119,8 @@ struct SubStartRef { ...@@ -119,7 +119,8 @@ struct SubStartRef {
Undefined = 1, Undefined = 1,
NF_FakeErrorREF = 11, NF_FakeErrorREF = 11,
Busy = 701, Busy = 701,
NotMaster = 702 NotMaster = 702,
PartiallyConnected = 1421
}; };
STATIC_CONST( SignalLength = 7 ); STATIC_CONST( SignalLength = 7 );
......
...@@ -2396,6 +2396,16 @@ Suma::execSUB_START_REQ(Signal* signal){ ...@@ -2396,6 +2396,16 @@ Suma::execSUB_START_REQ(Signal* signal){
sendSubStartRef(signal, 1412); sendSubStartRef(signal, 1412);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
if (c_startup.m_restart_server_node_id == 0 &&
!c_connected_nodes.get(refToNode(subscriberRef)))
{
jam();
sendSubStartRef(signal, SubStartRef::PartiallyConnected);
return;
}
DBUG_PRINT("info",("c_subscriberPool size: %d free: %d", DBUG_PRINT("info",("c_subscriberPool size: %d free: %d",
c_subscriberPool.getSize(), c_subscriberPool.getSize(),
c_subscriberPool.getNoOfFree())); c_subscriberPool.getNoOfFree()));
......
...@@ -983,7 +983,7 @@ NdbEventOperationImpl::printAll() ...@@ -983,7 +983,7 @@ NdbEventOperationImpl::printAll()
NdbEventBuffer::NdbEventBuffer(Ndb *ndb) : NdbEventBuffer::NdbEventBuffer(Ndb *ndb) :
m_system_nodes(ndb->theImpl->theNoOfDBnodes), m_system_nodes(ndb->theImpl->theNoOfDBnodes),
m_ndb(ndb), m_ndb(ndb),
m_latestGCI(0), m_latestGCI(0), m_latest_complete_GCI(0),
m_total_alloc(0), m_total_alloc(0),
m_free_thresh(10), m_free_thresh(10),
m_min_free_thresh(10), m_min_free_thresh(10),
...@@ -1475,7 +1475,7 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep) ...@@ -1475,7 +1475,7 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep)
, m_flush_gci , m_flush_gci
#endif #endif
); );
Uint32 idx = bucket - (Gci_container*)m_active_gci.getBase();
if (unlikely(bucket == 0)) if (unlikely(bucket == 0))
{ {
/** /**
...@@ -1520,8 +1520,20 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep) ...@@ -1520,8 +1520,20 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep)
} }
reportStatus(); reportStatus();
bzero(bucket, sizeof(Gci_container)); bzero(bucket, sizeof(Gci_container));
if (likely(idx < ACTIVE_GCI_DIRECTORY_SIZE))
{
/**
* Only "prepare" next GCI if we're in
* the first 4 highest GCI's...else
* this is somekind of "late" GCI...
* which is only initialized to 0
*
* This to make sure we dont get several buckets with same GCI
*/
bucket->m_gci = gci + ACTIVE_GCI_DIRECTORY_SIZE; bucket->m_gci = gci + ACTIVE_GCI_DIRECTORY_SIZE;
bucket->m_gcp_complete_rep_count = m_system_nodes; bucket->m_gcp_complete_rep_count = m_system_nodes;
}
if(unlikely(m_latest_complete_GCI > gci)) if(unlikely(m_latest_complete_GCI > gci))
{ {
complete_outof_order_gcis(); complete_outof_order_gcis();
......
...@@ -491,6 +491,7 @@ ErrorBundle ErrorCodes[] = { ...@@ -491,6 +491,7 @@ ErrorBundle ErrorCodes[] = {
{ 1419, DMEC, SE, "Subscription already dropped" }, { 1419, DMEC, SE, "Subscription already dropped" },
{ 1420, DMEC, TR, "Subscriber manager busy with adding/removing a table" }, { 1420, DMEC, TR, "Subscriber manager busy with adding/removing a table" },
{ 1421, DMEC, SE, "Partially connected API in NdbOperation::execute()" },
{ 4004, DMEC, AE, "Attribute name or id not found in the table" }, { 4004, DMEC, AE, "Attribute name or id not found in the table" },
......
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