List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:August 31 2010 6:43am
Subject:bzr push into mysql-5.1-telco-6.3 branch (jonas:3269 to 3270) Bug#54944
View as plain text  
 3270 Jonas Oreland	2010-08-31
      ndb - bug#54944 - out of commit ack markers could sometimes lead to node-crash

    modified:
      storage/ndb/src/kernel/blocks/ERROR_codes.txt
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
 3269 Jonas Oreland	2010-08-30
      ndb - use configure to check for __is_pod and similar (instead of #defines), fix problems found

    modified:
      config/ac-macros/ha_ndbcluster.m4
      storage/ndb/include/kernel/AttributeList.hpp
      storage/ndb/include/kernel/signaldata/BackupSignalData.hpp
      storage/ndb/include/kernel/signaldata/CreateEvnt.hpp
      storage/ndb/include/ndb_global.h.in
      storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
=== modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt'
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2010-08-26 09:00:51 +0000
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2010-08-31 06:28:52 +0000
@@ -6,7 +6,7 @@ Next DBTUP 4032
 Next DBLQH 5057
 Next DBDICT 6025
 Next DBDIH 7226
-Next DBTC 8083
+Next DBTC 8088
 Next CMVMI 9000
 Next BACKUP 10041
 Next DBUTIL 11002

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2010-08-20 10:18:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2010-08-31 06:28:52 +0000
@@ -2552,6 +2552,8 @@ Dbtc::seizeTcRecord(Signal* signal)
   regTcPtr->isIndexOp = false;
   regTcPtr->indexOp = RNIL;
   regTcPtr->currentIndexId = RNIL;
+  regTcPtr->tcConnectstate = OS_ABORTING;
+  regTcPtr->noOfNodes = 0;
 
   regApiPtr->lastTcConnect = TtcConnectptrIndex;
 
@@ -2974,6 +2976,13 @@ void Dbtc::execTCKEYREQ(Signal* signal) 
       {
         jam();
         CommitAckMarkerPtr tmp;
+        if (ERROR_INSERTED(8087))
+        {
+          CLEAR_ERROR_INSERT_VALUE;
+          TCKEY_abort(signal, 56);
+          return;
+        }
+
         if (!m_commitAckMarkerHash.seize(tmp))
         {
           TCKEY_abort(signal, 56);
@@ -11296,6 +11305,8 @@ void Dbtc::seizeTcConnect(Signal* signal
   cfirstfreeTcConnect = tcConnectptr.p->nextTcConnect;
   c_counters.cconcurrentOp++;
   tcConnectptr.p->isIndexOp = false;
+  tcConnectptr.p->tcConnectstate = OS_ABORTING;
+  tcConnectptr.p->noOfNodes = 0;
 }//Dbtc::seizeTcConnect()
 
 void Dbtc::seizeTcConnectFail(Signal* signal) 

=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2010-07-30 21:23:38 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2010-08-31 06:28:52 +0000
@@ -1980,6 +1980,41 @@ runBug54986(NDBT_Context* ctx, NDBT_Step
   return NDBT_OK;
 }
 
+int
+runBug54944(NDBT_Context* ctx, NDBT_Step* step)
+{
+  Ndb* pNdb = GETNDB(step);
+  const NdbDictionary::Table * pTab = ctx->getTab();
+  NdbRestarter res;
+
+  for (Uint32 i = 0; i<5; i++)
+  {
+    Uint32 rows = 5000 + i * 2000;
+    HugoOperations hugoOps(*pTab);
+    hugoOps.startTransaction(pNdb);
+
+    for (Uint32 r = 0; r < rows; r++)
+    {
+      for (Uint32 b = 0; b<100; b++, r++)
+      {
+        hugoOps.pkInsertRecord(pNdb, r);
+      }
+      hugoOps.execute_NoCommit(pNdb);
+    }
+
+    res.insertErrorInAllNodes(8087);
+
+    HugoTransactions hugoTrans(*pTab);
+    hugoTrans.loadTableStartFrom(pNdb, 50000, 100);
+
+    hugoOps.execute_Rollback(pNdb);
+    hugoTrans.clearTable(pNdb);
+
+    res.insertErrorInAllNodes(0);
+  }
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testBasic);
 TESTCASE("PkInsert", 
 	 "Verify that we can insert and delete from this table using PK"
@@ -2289,6 +2324,10 @@ TESTCASE("Bug54986", "")
 {
   INITIALIZER(runBug54986);
 }
+TESTCASE("Bug54944", "")
+{
+  INITIALIZER(runBug54944);
+}
 NDBT_TESTSUITE_END(testBasic);
 
 #if 0

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2010-08-26 09:00:51 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2010-08-31 06:28:52 +0000
@@ -251,6 +251,10 @@ max-time: 500
 cmd: testBasic
 args: -n Bug20535
 
+max-time: 500
+cmd: testBasic
+args: -n Bug54944 T1
+
 #
 # INDEX
 #


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100831062852-2ruuaq6fttp46u01.bundle
Thread
bzr push into mysql-5.1-telco-6.3 branch (jonas:3269 to 3270) Bug#54944Jonas Oreland31 Aug