#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped
2954 Jonas Oreland 2009-05-17 [merge]
merge 62 to 63
M storage/ndb/src/kernel/blocks/suma/Suma.cpp
M storage/ndb/test/ndbapi/test_event.cpp
M storage/ndb/test/run-test/daily-basic-tests.txt
2572.56.23 Jonas Oreland 2009-05-17
ndb - bug#44915
keep hashtable consistent even in unusual error situations
M storage/ndb/src/kernel/blocks/suma/Suma.cpp
M storage/ndb/test/ndbapi/test_event.cpp
M 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 2009-04-06 09:44:47 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2009-05-17 07:54:17 +0000
@@ -1544,13 +1544,18 @@ Suma::execSUB_CREATE_REQ(Signal* signal)
Ptr<SubOpRecord> subOpPtr;
LocalDLFifoList<SubOpRecord> subOpList(c_subOpPool, subPtr.p->m_create_req);
- if (subOpList.seize(subOpPtr) == false)
+ if ((ERROR_INSERTED(13044) && found == false) ||
+ subOpList.seize(subOpPtr) == false)
{
jam();
if (found == false)
{
jam();
- c_subscriptions.release(subPtr);
+ if (ERROR_INSERTED(13044))
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+ c_subscriptionPool.release(subPtr); // not yet in hash
}
sendSubCreateRef(signal, senderRef, senderData,
SubCreateRef::OutOfTableRecords);
@@ -1579,11 +1584,16 @@ Suma::execSUB_CREATE_REQ(Signal* signal)
else
{
jam();
- if (c_tablePool.seize(tabPtr) == false)
+ if (ERROR_INSERTED(13045) || c_tablePool.seize(tabPtr) == false)
{
jam();
+ if (ERROR_INSERTED(13045))
+ {
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+
subOpList.release(subOpPtr);
- c_subscriptions.release(subPtr);
+ c_subscriptionPool.release(subPtr); // not yet in hash
sendSubCreateRef(signal, senderRef, senderData,
SubCreateRef::OutOfTableRecords);
return;
@@ -1841,6 +1851,7 @@ Suma::execGET_TABINFOREF(Signal* signal)
}
Ptr<Subscription> tmp1 = subPtr;
subList.next(subPtr);
+ c_subscriptions.remove(tmp1);
subList.release(tmp1);
}
=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp 2009-03-20 08:31:52 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp 2009-05-17 07:54:17 +0000
@@ -3260,6 +3260,26 @@ runBug30780(NDBT_Context* ctx, NDBT_Step
return NDBT_OK;
}
+int
+runBug44915(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+
+ NdbRestarter res;
+ int error[] = { 13031, 13044, 13045, 0 };
+ for (int i = 0; error[i]; i++)
+ {
+ ndbout_c("error: %d", error[i]);
+ res.insertErrorInNode(res.getDbNodeId(rand() % res.getNumDbNodes()),
+ error[i]);
+
+ result = runCreateEvent(ctx, step); // should fail due to error insert
+ result = runCreateEvent(ctx, step); // should pass
+ }
+
+ return result;
+}
+
NDBT_TESTSUITE(test_event);
TESTCASE("BasicEventOperation",
"Verify that we can listen to Events"
@@ -3464,6 +3484,10 @@ TESTCASE("Bug30780", "")
STEP(runBug30780);
FINALIZER(runDropEvent);
}
+TESTCASE("Bug44915", "")
+{
+ INITIALIZER(runBug44915);
+}
NDBT_TESTSUITE_END(test_event);
int main(int argc, const char** argv){
=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt 2009-04-03 10:08:24 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt 2009-05-17 07:54:17 +0000
@@ -1300,3 +1300,7 @@ max-time: 1200
cmd: testNdbApi
args: -n Bug44015 T1
+max-time: 1200
+cmd: test_event
+args: -n Bug44915 T1
+
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090517075417-wirmsmvhhijlcmoh.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (jonas:2954) | Jonas Oreland | 17 May |