#At file:///home/tomas/mysql_src/cge-6.3/
2629 Tomas Ulin 2008-06-18 [merge]
merge
modified:
storage/ndb/src/kernel/blocks/suma/Suma.cpp
storage/ndb/src/kernel/blocks/suma/Suma.hpp
storage/ndb/src/kernel/blocks/suma/SumaInit.cpp
storage/ndb/test/ndbapi/testInterpreter.cpp
storage/ndb/test/ndbapi/testSystemRestart.cpp
storage/ndb/test/ndbapi/test_event.cpp
storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-06-16 06:50:10 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-06-18 21:22:31 +0000
@@ -733,6 +733,7 @@ void Suma::execAPI_FAILREQ(Signal* signa
c_failedApiNodes.set(failedApiNode);
c_subscriber_nodes.clear(failedApiNode);
+ c_subscriber_per_node[failedApiNode] = 0;
check_start_handover(signal);
@@ -2680,6 +2681,7 @@ Suma::report_sub_start_conf(Signal* sign
list.add(ptr);
c_subscriber_nodes.set(refToNode(ptr.p->m_senderRef));
+ c_subscriber_per_node[refToNode(ptr.p->m_senderRef)]++;
}
else
{
@@ -3157,6 +3159,17 @@ Suma::report_sub_stop_conf(Signal* signa
conf->senderData= senderData;
sendSignal(senderRef, GSN_SUB_STOP_CONF, signal,
SubStopConf::SignalLength, JBB);
+
+ Uint32 nodeId = refToNode(ptr.p->m_senderRef);
+ if (c_subscriber_per_node[nodeId])
+ {
+ c_subscriber_per_node[nodeId]--;
+ if (c_subscriber_per_node[nodeId] == 0)
+ {
+ jam();
+ c_subscriber_nodes.clear(nodeId);
+ }
+ }
}
void
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.hpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-06-16 06:50:10 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-06-18 21:22:31 +0000
@@ -578,7 +578,8 @@ private:
STATIC_CONST( NO_OF_BUCKETS = 24 ); // 24 = 4*3*2*1!
Uint32 c_no_of_buckets;
struct Bucket c_buckets[NO_OF_BUCKETS];
-
+ Uint32 c_subscriber_per_node[MAX_NODES];
+
STATIC_CONST( BUCKET_MASK_SIZE = (((NO_OF_BUCKETS+31)>> 5)) );
typedef Bitmask<BUCKET_MASK_SIZE> Bucket_mask;
Bucket_mask m_active_buckets;
=== modified file 'storage/ndb/src/kernel/blocks/suma/SumaInit.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp 2008-02-20 09:04:29 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp 2008-06-17 08:49:39 +0000
@@ -124,6 +124,7 @@ Suma::Suma(Block_context& ctx) :
m_gcp_monitor = 0;
#endif
m_missing_data = false;
+ bzero(c_subscriber_per_node, sizeof(c_subscriber_per_node));
}
Suma::~Suma()
=== modified file 'storage/ndb/test/ndbapi/testInterpreter.cpp'
--- a/storage/ndb/test/ndbapi/testInterpreter.cpp 2008-05-23 09:07:58 +0000
+++ b/storage/ndb/test/ndbapi/testInterpreter.cpp 2008-06-18 14:55:21 +0000
@@ -206,8 +206,9 @@ int runTestBug19537(NDBT_Context* ctx, N
// Load 64-bit constant into register 1 and
// write from register 1 to 32-bit column KOL2
const Uint64 reg_val = 0x0102030405060708ULL;
-
- const Uint32* reg_ptr32 = (const Uint32*)®_val;
+ Uint32 reg_ptr32[2];
+ memcpy(reg_ptr32+0, (Uint8*)®_val, sizeof(Uint32));
+ memcpy(reg_ptr32+1, ((Uint8*)®_val)+4, sizeof(Uint32));
if (reg_ptr32[0] == 0x05060708 && reg_ptr32[1] == 0x01020304) {
g_err << "runTestBug19537: platform is LITTLE endian" << endl;
} else if (reg_ptr32[0] == 0x01020304 && reg_ptr32[1] == 0x05060708) {
=== modified file 'storage/ndb/test/ndbapi/testSystemRestart.cpp'
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp 2008-03-25 15:47:07 +0000
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp 2008-06-18 21:22:31 +0000
@@ -1271,7 +1271,7 @@ runBug29167(NDBT_Context* ctx, NDBT_Step
NdbRestarter restarter;
const Uint32 nodeCount = restarter.getNumDbNodes();
- if (nodeCount < 2)
+ if (nodeCount < 4)
return NDBT_OK;
int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 };
=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp 2008-06-11 20:28:21 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp 2008-06-18 21:22:31 +0000
@@ -1806,7 +1806,6 @@ runBug31701(NDBT_Context* ctx, NDBT_Step
int records = ctx->getNumRecords();
HugoTransactions hugoTrans(*ctx->getTab());
- if(ctx->getPropertyWait("LastGCI", ~(Uint32)0))
if(ctx->getPropertyWait("LastGCI_hi", ~(Uint32)0))
{
g_err << "FAIL " << __LINE__ << endl;
@@ -2645,6 +2644,52 @@ runBug37338(NDBT_Context* ctx, NDBT_Step
return NDBT_OK;
}
+int
+runBug37442(NDBT_Context* ctx, NDBT_Step* step)
+{
+ NdbRestarter res;
+ if (res.getNumDbNodes() < 2)
+ {
+ ctx->stopTest();
+ return NDBT_OK;
+ }
+
+ int nodeId = res.getDbNodeId(rand() % res.getNumDbNodes());
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* dict = pNdb->getDictionary();
+ const NdbDictionary::Table* tab = dict->getTable(ctx->getTab()->getName());
+
+ if (runCreateEvent(ctx, step))
+ {
+ return NDBT_FAILED;
+ }
+
+ for (int i = 0; i<ctx->getNumLoops(); i++)
+ {
+ NdbEventOperation * pOp = createEventOperation(GETNDB(step), *tab);
+
+ res.restartOneDbNode(nodeId,
+ /** initial */ false,
+ /** nostart */ true,
+ /** abort */ true);
+
+ res.waitNodesNoStart(&nodeId, 1);
+
+ GETNDB(step)->dropEventOperation(pOp);
+
+ res.startNodes(&nodeId, 1);
+ if (res.waitClusterStarted())
+ {
+ return NDBT_FAILED;
+ }
+ }
+
+ runDropEvent(ctx, step);
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(test_event);
TESTCASE("BasicEventOperation",
"Verify that we can listen to Events"
@@ -2831,6 +2876,10 @@ TESTCASE("Bug37279", "")
TESTCASE("Bug37338", "")
{
INITIALIZER(runBug37338);
+}
+TESTCASE("Bug37442", "")
+{
+ INITIALIZER(runBug37442);
}
NDBT_TESTSUITE_END(test_event);
=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt 2008-06-11 20:28:21 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2008-06-18 21:22:31 +0000
@@ -467,10 +467,6 @@ args: -n ScanReadWhileNodeIsDown D1 D2
max-time: 500
cmd: testScan
-args: -n ScanRestart T1 D1 D2
-
-max-time: 500
-cmd: testScan
args: -l 100 -n Scan-bug8262 T6 D1 D2
max-time: 500
@@ -1121,6 +1117,10 @@ args: -n Bug37279 T1
max-time: 300
cmd: test_event
args: -n Bug37338 T1
+
+max-time: 300
+cmd: test_event
+args: -n Bug37442 T1
# 2008-04-22
max-time: 1500
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (tomas.ulin:2629) | Tomas Ulin | 19 Jun |