List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:June 15 2011 1:38pm
Subject:bzr commit into mysql-5.5-cluster branch (magnus.blaudd:3356)
View as plain text  
#At file:///data0/magnus/mysql/5.5-cluster/ based on revid:magnus.blaudd@stripped

 3356 magnus.blaudd@stripped	2011-06-15 [merge]
      Merge 7.0 -> 5.5-cluster

    modified:
      storage/ndb/include/mgmapi/mgmapi_config_parameters.h
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
      storage/ndb/src/kernel/vm/NdbSeqLock.hpp
      storage/ndb/src/mgmsrv/ConfigInfo.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/src/ndbapi/ndberror.c
      storage/ndb/test/ndbapi/testSystemRestart.cpp
      storage/ndb/test/run-test/autotest-boot.sh
      storage/ndb/test/src/NdbBackup.cpp
=== modified file 'storage/ndb/include/mgmapi/mgmapi_config_parameters.h'
--- a/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2011-05-31 08:28:58 +0000
+++ b/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2011-06-15 10:55:06 +0000
@@ -194,6 +194,8 @@
 #define CFG_DB_INDEX_STAT_TRIGGER_SCALE  625
 #define CFG_DB_INDEX_STAT_UPDATE_DELAY   626
 
+#define CFG_DB_MAX_DML_OPERATIONS_PER_TRANSACTION 627
+
 #define CFG_NODE_ARBIT_RANK           200
 #define CFG_NODE_ARBIT_DELAY          201
 #define CFG_RESERVED_SEND_BUFFER_MEMORY 202

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-05-31 08:28:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-06-13 12:27:32 +0000
@@ -14238,6 +14238,15 @@ retry:
       sltLogPartPtr.p->logTailMbyte = 
         sltLogFilePtr.p->logLastPrepRef[tsltMbyte] & 65535;
 
+      if (DEBUG_REDO)
+      {
+        ndbout_c("part: %u setLogTail(gci: %u): file: %u mb: %u",
+                 sltLogPartPtr.p->logPartNo, 
+                 keepGci,
+                 sltLogPartPtr.p->logTailFileNo,
+                 sltLogPartPtr.p->logTailMbyte);
+      }
+
       bool tailmoved = !(ToldTailFileNo == sltLogPartPtr.p->logTailFileNo &&
                          ToldTailMByte == sltLogPartPtr.p->logTailMbyte);
 
@@ -16169,11 +16178,28 @@ void Dblqh::writeFileDescriptor(Signal* 
   arrGuard(logFilePtr.p->currentMbyte, clogFileSize);
   if (DEBUG_REDO)
   {
-    ndbout_c("part: %u file: %u setting logMaxGciCompleted[%u] = %u",
-             logPartPtr.p->logPartNo,
-             logFilePtr.p->fileNo,
-             logFilePtr.p->currentMbyte,
-             logPartPtr.p->logPartNewestCompletedGCI);
+    printf("part: %u file: %u setting logMaxGciCompleted[%u] = %u logMaxGciStarted[%u]: %u lastPrepRef[%u]: ",
+           logPartPtr.p->logPartNo,
+           logFilePtr.p->fileNo,
+           logFilePtr.p->currentMbyte,
+           logPartPtr.p->logPartNewestCompletedGCI,
+           logFilePtr.p->currentMbyte,
+           cnewestGci,
+           logFilePtr.p->currentMbyte);
+    if (logPartPtr.p->firstLogTcrec == RNIL)
+    {
+      ndbout_c("file: %u mb: %u (RNIL)",
+               logFilePtr.p->fileNo,
+               logFilePtr.p->currentMbyte);
+    }
+    else
+    {
+      wfdTcConnectptr.i = logPartPtr.p->firstLogTcrec;
+      ptrCheckGuard(wfdTcConnectptr, ctcConnectrecFileSize, tcConnectionrec);
+      ndbout_c("file: %u mb: %u",
+               wfdTcConnectptr.p->logStartFileNo,
+               wfdTcConnectptr.p->logStartPageNo >> ZTWOLOG_NO_PAGES_IN_MBYTE);
+    }
   }
   logFilePtr.p->logMaxGciCompleted[logFilePtr.p->currentMbyte] = 
     logPartPtr.p->logPartNewestCompletedGCI;
@@ -16346,10 +16372,11 @@ void Dblqh::writeSinglePage(Signal* sign
 
   if (DEBUG_REDO)
   {
-    ndbout_c("writeSingle 1 page at part: %u file: %u pos: %u",
+    ndbout_c("writeSingle 1 page at part: %u file: %u page: %u (mb: %u)",
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             pageNo);
+             pageNo,
+             pageNo >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 }//Dblqh::writeSinglePage()
 
@@ -16452,8 +16479,10 @@ void Dblqh::readSrLastMbyteLab(Signal* s
       logPartPtr.p->lastMbyte = logFilePtr.p->currentMbyte - 1;
       if (DEBUG_REDO)
       {
-        ndbout_c("readSrLastMbyteLab part: %u lastMbyte: %u",
-                 logPartPtr.p->logPartNo, logPartPtr.p->lastMbyte);
+        ndbout_c("readSrLastMbyteLab part: %u file: %u lastMbyte: %u",
+                 logPartPtr.p->logPartNo, 
+                 logFilePtr.p->fileNo,
+                 logPartPtr.p->lastMbyte);
       }
     }//if
   }//if
@@ -17503,6 +17532,17 @@ void Dblqh::execSrCompletedLab(Signal* s
         systemErrorLab(signal, __LINE__);
         return;
       }//if
+
+      if (DEBUG_REDO)
+      {
+        ndbout_c("part: %u srLogLimits SR_FOURTH_PHASE %u-%u (file: %u mb: %u)",
+                 logPartPtr.p->logPartNo, 
+                 logPartPtr.p->logStartGci,
+                 logPartPtr.p->logLastGci,
+                 logPartPtr.p->lastLogfile,
+                 logPartPtr.p->lastMbyte);
+      }
+
       signal->theData[0] = ZSR_LOG_LIMITS;
       signal->theData[1] = logPartPtr.i;
       signal->theData[2] = logPartPtr.p->lastLogfile;
@@ -17689,6 +17729,15 @@ void Dblqh::srGciLimits(Signal* signal) 
     jam();
     ptrAss(logPartPtr, logPartRecord);
     logPartPtr.p->logExecState = LogPartRecord::LES_SEARCH_STOP;
+    if (DEBUG_REDO)
+    {
+      ndbout_c("part: %u srLogLimits (srGciLimits) %u-%u (file: %u mb: %u)",
+               logPartPtr.p->logPartNo, 
+               logPartPtr.p->logStartGci,
+               logPartPtr.p->logLastGci,
+               logPartPtr.p->lastLogfile,
+               logPartPtr.p->lastMbyte);
+    }
     signal->theData[0] = ZSR_LOG_LIMITS;
     signal->theData[1] = logPartPtr.i;
     signal->theData[2] = logPartPtr.p->lastLogfile;
@@ -17720,22 +17769,34 @@ void Dblqh::srLogLimits(Signal* signal) 
    * ----------------------------------------------------------------------- */
   while(true) {
     ndbrequire(tmbyte < clogFileSize);
-    if (logPartPtr.p->logExecState == LogPartRecord::LES_SEARCH_STOP) {
-      if (logFilePtr.p->logMaxGciCompleted[tmbyte] <= logPartPtr.p->logLastGci) {
+    if (logPartPtr.p->logExecState == LogPartRecord::LES_SEARCH_STOP)
+    {
+      if (logFilePtr.p->logMaxGciCompleted[tmbyte] <= logPartPtr.p->logLastGci)
+      {
         jam();
-      /* --------------------------------------------------------------------
-       *  WE ARE STEPPING BACKWARDS FROM MBYTE TO MBYTE. THIS IS THE FIRST 
-       *  MBYTE WHICH IS TO BE INCLUDED IN THE LOG EXECUTION. THE STOP GCI 
-       *  HAS NOT BEEN COMPLETED BEFORE THIS MBYTE. THUS THIS MBYTE HAVE 
-       *  TO BE EXECUTED.
-       * ------------------------------------------------------------------- */
+        /* --------------------------------------------------------------------
+         *  WE ARE STEPPING BACKWARDS FROM MBYTE TO MBYTE. THIS IS THE FIRST 
+         *  MBYTE WHICH IS TO BE INCLUDED IN THE LOG EXECUTION. THE STOP GCI 
+         *  HAS NOT BEEN COMPLETED BEFORE THIS MBYTE. THUS THIS MBYTE HAVE 
+         *  TO BE EXECUTED.
+         * ------------------------------------------------------------------ */
         logPartPtr.p->stopLogfile = logFilePtr.i;
         logPartPtr.p->stopMbyte = tmbyte;
         logPartPtr.p->logExecState = LogPartRecord::LES_SEARCH_START;
+        if (DEBUG_REDO)
+        {
+          ndbout_c("part: %u srLogLimits found stop pos file: %u mb: %u logMaxGciCompleted[tmbyte]: %u (lastGci: %u)",
+                   logPartPtr.p->logPartNo,
+                   logFilePtr.p->fileNo,
+                   tmbyte,
+                   logFilePtr.p->logMaxGciCompleted[tmbyte],
+                   logPartPtr.p->logLastGci);
+        }
       }//if
       else if (DEBUG_REDO)
       {
-        ndbout_c("SKIP part: %u file: %u mb: %u logMaxGciCompleted: %u >= %u",
+        ndbout_c("SEARCH STOP SKIP part: %u file: %u mb: %u "
+                 "logMaxGciCompleted: %u > %u",
                  logPartPtr.p->logPartNo,
                  logFilePtr.p->fileNo,
                  tmbyte,
@@ -17743,28 +17804,53 @@ void Dblqh::srLogLimits(Signal* signal) 
                  logPartPtr.p->logLastGci);
       }
     }//if
-  /* ------------------------------------------------------------------------
-   *  WHEN WE HAVEN'T FOUND THE STOP MBYTE IT IS NOT NECESSARY TO LOOK FOR THE
-   *  START MBYTE. THE REASON IS THE FOLLOWING LOGIC CHAIN: 
-   *    MAX_GCI_STARTED >= MAX_GCI_COMPLETED >= LAST_GCI >= START_GCI
-   *  THUS MAX_GCI_STARTED >= START_GCI. THUS MAX_GCI_STARTED < START_GCI CAN
-   *  NOT BE TRUE AS WE WILL CHECK OTHERWISE.
-   * ----------------------------------------------------------------------- */
-    if (logPartPtr.p->logExecState == LogPartRecord::LES_SEARCH_START) {
-      if (logFilePtr.p->logMaxGciStarted[tmbyte] < logPartPtr.p->logStartGci) {
+    /* ------------------------------------------------------------------------
+     *  WHEN WE HAVEN'T FOUND THE STOP MBYTE IT IS NOT NECESSARY TO LOOK FOR THE
+     *  START MBYTE. THE REASON IS THE FOLLOWING LOGIC CHAIN: 
+     *    MAX_GCI_STARTED >= MAX_GCI_COMPLETED >= LAST_GCI >= START_GCI
+     *  THUS MAX_GCI_STARTED >= START_GCI. THUS MAX_GCI_STARTED < START_GCI CAN
+     *  NOT BE TRUE AS WE WILL CHECK OTHERWISE.
+     * ---------------------------------------------------------------------- */
+    if (logPartPtr.p->logExecState == LogPartRecord::LES_SEARCH_START)
+    {
+      if (logFilePtr.p->logMaxGciStarted[tmbyte] < logPartPtr.p->logStartGci)
+      {
         jam();
-      /* --------------------------------------------------------------------
-       *  WE HAVE NOW FOUND THE START OF THE EXECUTION OF THE LOG. 
-       *  WE STILL HAVE TO MOVE IT BACKWARDS TO ALSO INCLUDE THE 
-       *  PREPARE RECORDS WHICH WERE STARTED IN A PREVIOUS MBYTE.
-       * ------------------------------------------------------------------- */
+        /* --------------------------------------------------------------------
+         *  WE HAVE NOW FOUND THE START OF THE EXECUTION OF THE LOG. 
+         *  WE STILL HAVE TO MOVE IT BACKWARDS TO ALSO INCLUDE THE 
+         *  PREPARE RECORDS WHICH WERE STARTED IN A PREVIOUS MBYTE.
+         * ------------------------------------------------------------------ */
+        if (DEBUG_REDO)
+        {
+          ndbout_c("part: %u srLogLimits found start pos file: %u mb: %u logMaxGciStarted[tmbyte]: %u (startGci: %u)",
+                   logPartPtr.p->logPartNo,
+                   logFilePtr.p->fileNo,
+                   tmbyte,
+                   logFilePtr.p->logMaxGciCompleted[tmbyte],
+                   logPartPtr.p->logStartGci);
+          ndbout_c("part: %u srLogLimits lastPrepRef => file: %u mb: %u",
+                   logPartPtr.p->logPartNo, 
+                   logFilePtr.p->logLastPrepRef[tmbyte] >> 16,
+                   logFilePtr.p->logLastPrepRef[tmbyte] & 65535);
+        }
         tlastPrepRef = logFilePtr.p->logLastPrepRef[tmbyte];
         logPartPtr.p->startMbyte = tlastPrepRef & 65535;
         LogFileRecordPtr locLogFilePtr;
         findLogfile(signal, tlastPrepRef >> 16, logPartPtr, &locLogFilePtr);
         logPartPtr.p->startLogfile = locLogFilePtr.i;
         logPartPtr.p->logExecState = LogPartRecord::LES_EXEC_LOG;
-      }//if
+      }
+      else if (DEBUG_REDO)
+      {
+        ndbout_c("SEARCH START SKIP part: %u file: %u mb: %u "
+                 "logMaxGciCompleted: %u >= %u",
+                 logPartPtr.p->logPartNo,
+                 logFilePtr.p->fileNo,
+                 tmbyte,
+                 logFilePtr.p->logMaxGciStarted[tmbyte],
+                 logPartPtr.p->logStartGci);
+      }
     }//if
     if (logPartPtr.p->logExecState != LogPartRecord::LES_EXEC_LOG) {
       if (tmbyte == 0) {
@@ -18250,11 +18336,12 @@ void Dblqh::execSr(Signal* signal) 
       logWord = readLogword(signal);
       if (DEBUG_REDO)
       {
-        ndbout_c("found gci: %u part: %u file: %u page: %u",
+        ndbout_c("found gci: %u part: %u file: %u page: %u (mb: %u)",
                  logWord,
                  logPartPtr.p->logPartNo,
                  logFilePtr.p->fileNo,
-                 logFilePtr.p->currentFilepage);
+                 logFilePtr.p->currentFilepage,
+                 logFilePtr.p->currentFilepage >> ZTWOLOG_NO_PAGES_IN_MBYTE);
       }
       if (logWord == logPartPtr.p->logLastGci)
       {
@@ -18868,6 +18955,30 @@ stepNext_2:
     {
       jam();
       logPartPtr.p->invalidatePageNo = logPartPtr.p->headPageNo;
+
+      if (! ((cstartType == NodeState::ST_INITIAL_START) ||
+             (cstartType == NodeState::ST_INITIAL_NODE_RESTART)))
+      {
+        jam();
+        if (logFilePtr.i == logPartPtr.p->lastLogfile)
+        {
+          jam();
+          Uint32 lastMbytePageNo =
+            logPartPtr.p->lastMbyte << ZTWOLOG_NO_PAGES_IN_MBYTE;
+          if (logPartPtr.p->invalidatePageNo < lastMbytePageNo)
+          {
+            jam();
+            if (DEBUG_REDO)
+            {
+              ndbout_c("readFileInInvalidate part: %u step: %u moving invalidatePageNo from %u to %u (lastMbyte)",
+                       logPartPtr.p->logPartNo, stepNext,
+                       logPartPtr.p->invalidatePageNo,
+                       lastMbytePageNo);
+            }
+            logPartPtr.p->invalidatePageNo = lastMbytePageNo;
+          }
+        }
+      }
       readFileInInvalidate(signal, 1);
       return;
     }
@@ -19879,11 +19990,12 @@ void Dblqh::completedLogPage(Signal* sig
 
   if (DEBUG_REDO)
   {
-    ndbout_c("writing %d pages at part: %u file: %u pos: %u",
+    ndbout_c("writing %d pages at part: %u file: %u page: %u (mb: %u)",
              twlpNoPages,
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             logFilePtr.p->filePosition);
+             logFilePtr.p->filePosition,
+             logFilePtr.p->filePosition >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 
   if (twlpType == ZNORMAL) {
@@ -21089,11 +21201,12 @@ void Dblqh::readExecLog(Signal* signal) 
 
   if (DEBUG_REDO)
   {
-    ndbout_c("readExecLog %u page at part: %u file: %u pos: %u",
+    ndbout_c("readExecLog %u page at part: %u file: %u page: %u (mb: %u)",
              lfoPtr.p->noPagesRw,
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             logPartPtr.p->execSrStartPageNo);
+             logPartPtr.p->execSrStartPageNo,
+             logPartPtr.p->execSrStartPageNo >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 }//Dblqh::readExecLog()
 
@@ -21160,11 +21273,12 @@ void Dblqh::readExecSr(Signal* signal) 
 
   if (DEBUG_REDO)
   {
-    ndbout_c("readExecSr %u page at part: %u file: %u pos: %u",
+    ndbout_c("readExecSr %u page at part: %u file: %u page: %u (mb: %u)",
              8,
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             tresPageid);
+             tresPageid,
+             tresPageid >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 }//Dblqh::readExecSr()
 
@@ -21322,10 +21436,11 @@ void Dblqh::readSinglePage(Signal* signa
 
   if (DEBUG_REDO)
   {
-    ndbout_c("readSinglePage 1 page at part: %u file: %u pos: %u",
+    ndbout_c("readSinglePage 1 page at part: %u file: %u page: %u (mb: %u)",
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             pageNo);
+             pageNo,
+             pageNo >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 }//Dblqh::readSinglePage()
 
@@ -21854,11 +21969,12 @@ void Dblqh::writeCompletedGciLog(Signal*
 
   if (DEBUG_REDO)
   {
-    ndbout_c("writeCompletedGciLog gci: %u part: %u file: %u page: %u",
+    ndbout_c("writeCompletedGciLog gci: %u part: %u file: %u page: %u (mb: %u)",
              cnewestCompletedGci,
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             logFilePtr.p->currentFilepage);
+             logFilePtr.p->currentFilepage,
+             logFilePtr.p->currentFilepage >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 
   writeLogWord(signal, ZCOMPLETED_GCI_TYPE);
@@ -21904,10 +22020,11 @@ void Dblqh::writeDirty(Signal* signal, U
 
   if (DEBUG_REDO)
   {
-    ndbout_c("writeDirty 1 page at part: %u file: %u pos: %u",
+    ndbout_c("writeDirty 1 page at part: %u file: %u page: %u (mb: %u)",
              logPartPtr.p->logPartNo,
              logFilePtr.p->fileNo,
-             logPartPtr.p->prevFilepage);
+             logPartPtr.p->prevFilepage,
+             logPartPtr.p->prevFilepage >> ZTWOLOG_NO_PAGES_IN_MBYTE);
   }
 }//Dblqh::writeDirty()
 

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-05-26 11:52:38 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-06-15 10:55:06 +0000
@@ -140,6 +140,7 @@
 #define ZUNLOCKED_IVAL_TOO_HIGH 294
 #define ZUNLOCKED_OP_HAS_BAD_STATE 295 
 #define ZBAD_DIST_KEY 298
+#define ZTRANS_TOO_BIG 261
 #endif
 
 class Dbtc: public SimulatedBlock {
@@ -722,6 +723,7 @@ public:
     };
 
     Uint32 no_commit_ack_markers;
+    Uint32 m_write_count;
     ReturnSignal returnsignal;
     AbortState abortState;
 
@@ -2102,6 +2104,7 @@ private:
   Uint32 c_lastFailedApi;
 #endif
   Uint32 m_deferred_enabled;
+  Uint32 m_max_writes_per_trans;
 };
 
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2011-04-28 07:47:53 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2011-06-15 10:55:06 +0000
@@ -338,6 +338,7 @@ Dbtc::Dbtc(Block_context& ctx, Uint32 in
   c_apiConTimer_line = 0;
   csystemStart = SSS_FALSE;
   m_deferred_enabled = ~Uint32(0);
+  m_max_writes_per_trans = ~Uint32(0);
 }//Dbtc::Dbtc()
 
 Dbtc::~Dbtc() 

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-05-31 12:28:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-06-15 10:55:06 +0000
@@ -685,6 +685,10 @@ void Dbtc::execREAD_CONFIG_REQ(Signal* s
   //ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_TRANSACTION_TAKEOVER, &val);
   set_no_parallel_takeover(val);
 
+  val = ~(Uint32)0;
+  ndb_mgm_get_int_parameter(p, CFG_DB_MAX_DML_OPERATIONS_PER_TRANSACTION, &val);
+  m_max_writes_per_trans = val;
+
   ctimeOutCheckDelay = 50; // 500ms
 }//Dbtc::execSIZEALT_REP()
 
@@ -1857,6 +1861,13 @@ start_failure:
     abortErrorLab(signal);
     return;
   }
+  case 65:
+  {
+    jam();
+    terrorCode = ZTRANS_TOO_BIG;
+    abortErrorLab(signal);
+    return;
+  }
   default:
     jam();
     systemErrorLab(signal, __LINE__);
@@ -2398,6 +2409,8 @@ void Dbtc::initApiConnectRec(Signal* sig
 #ifdef ERROR_INSERT
   regApiPtr->continueBCount = 0;
 #endif
+
+  regApiPtr->m_write_count = 0;
 }//Dbtc::initApiConnectRec()
 
 int
@@ -3068,6 +3081,11 @@ void Dbtc::execTCKEYREQ(Signal* signal) 
     case ZWRITE:
     case ZREFRESH:
       jam();
+      if (unlikely((++ regApiPtr->m_write_count) > m_max_writes_per_trans))
+      {
+        TCKEY_abort(signal, 65);
+        return;
+      }
       break;
     default:
       TCKEY_abort(signal, 9);

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-05-31 12:28:59 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-06-13 06:14:32 +0000
@@ -3909,7 +3909,7 @@ void Qmgr::failReportLab(Signal* signal,
       msg = "Start timeout";
       break;
     case FailRep::ZHEARTBEAT_FAILURE:
-      msg = "Hearbeat failure";
+      msg = "Heartbeat failure";
       break;
     case FailRep::ZLINK_FAILURE:
       msg = "Connection failure";

=== modified file 'storage/ndb/src/kernel/vm/NdbSeqLock.hpp'
--- a/storage/ndb/src/kernel/vm/NdbSeqLock.hpp	2011-05-17 07:06:30 +0000
+++ b/storage/ndb/src/kernel/vm/NdbSeqLock.hpp	2011-06-10 12:17:51 +0000
@@ -86,7 +86,7 @@ struct NdbSeqLock
   void write_lock() {}
   void write_unlock() {}
 
-  Uint32 read_lock() {}
+  Uint32 read_lock() { return 0; }
   bool read_unlock(Uint32 val) const { return true;}
 };
 

=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2011-05-19 09:16:32 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2011-06-15 10:55:06 +0000
@@ -36,6 +36,7 @@
 
 #define KEY_INTERNAL 0
 #define MAX_INT_RNIL 0xfffffeff
+#define MAX_INT32 0xffffffff
 #define MAX_PORT_NO 65535
 
 #define _STR_VALUE(x) #x
@@ -771,6 +772,19 @@ const ConfigInfo::ParamInfo ConfigInfo::
     STR_VALUE(MAX_INT_RNIL) },
 
   {
+    CFG_DB_MAX_DML_OPERATIONS_PER_TRANSACTION,
+    "MaxDMLOperationsPerTransaction",
+    DB_TOKEN,
+    "Max DML-operations in one transaction (0 == no limit)",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    STR_VALUE(MAX_INT32),
+    "32",
+    STR_VALUE(MAX_INT32)
+  },
+
+  {
     CFG_DB_NO_LOCAL_OPS,
     "MaxNoOfLocalOperations",
     DB_TOKEN,

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2011-05-25 14:31:47 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2011-06-13 10:38:49 +0000
@@ -596,6 +596,7 @@ NdbEventOperationImpl::execute_nolock()
     {
       switch(myDict->getNdbError().code){
       case 711:
+      case 763:
         // ignore;
         break;
       default:

=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c	2011-06-06 12:18:27 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c	2011-06-15 10:55:06 +0000
@@ -317,7 +317,9 @@ ErrorBundle ErrorCodes[] = {
    */
   { 281,  HA_ERR_NO_CONNECTION, AE, "Operation not allowed due to cluster shutdown in progress" },
   { 299,  DMEC, AE, "Operation not allowed or aborted due to single user mode" },
-  { 763,  DMEC, AE, "Alter table requires cluster nodes to have exact same version" },
+  { 261,  DMEC, AE,
+    "DML count in transaction exceeds config parameter MaxDMLOperationsPerTransaction" },
+  { 763,  DMEC, AE, "DDL is not supported with mixed data-node versions" },
   { 823,  DMEC, AE, "Too much attrinfo from application in tuple manager" },
   { 829,  DMEC, AE, "Corrupt data received for insert/update" },
   { 831,  DMEC, AE, "Too many nullable/bitfields in table definition" },

=== modified file 'storage/ndb/test/ndbapi/testSystemRestart.cpp'
--- a/storage/ndb/test/ndbapi/testSystemRestart.cpp	2011-02-18 18:40:25 +0000
+++ b/storage/ndb/test/ndbapi/testSystemRestart.cpp	2011-06-10 12:50:28 +0000
@@ -35,6 +35,14 @@ int runLoadTable(NDBT_Context* ctx, NDBT
   return NDBT_OK;
 }
 
+int
+clearOldBackups(NDBT_Context* ctx, NDBT_Step* step)
+{
+  NdbBackup backup(GETNDB(step)->getNodeId());
+  backup.clearOldBackups();
+  return NDBT_OK;
+}
+
 #define CHECK(b) if (!(b)) { \
   g_err << "ERR: "<< step->getName() \
          << " failed on line " << __LINE__ << endl; \
@@ -2594,6 +2602,7 @@ TESTCASE("SR_DD_1", "")
 {
   TC_PROPERTY("ALL", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_1);
   FINALIZER(runClearTable);
@@ -2601,6 +2610,7 @@ TESTCASE("SR_DD_1", "")
 TESTCASE("SR_DD_1b", "")
 {
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_1);
   FINALIZER(runClearTable);
 }
@@ -2609,6 +2619,7 @@ TESTCASE("SR_DD_1_LCP", "")
   TC_PROPERTY("ALL", 1);
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_1);
   FINALIZER(runClearTable);
@@ -2617,6 +2628,7 @@ TESTCASE("SR_DD_1b_LCP", "")
 {
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_1);
   FINALIZER(runClearTable);
 }
@@ -2624,6 +2636,7 @@ TESTCASE("SR_DD_2", "")
 {
   TC_PROPERTY("ALL", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_2);
   FINALIZER(runClearTable);
@@ -2631,6 +2644,7 @@ TESTCASE("SR_DD_2", "")
 TESTCASE("SR_DD_2b", "")
 {
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_2);
   FINALIZER(runClearTable);
 }
@@ -2639,6 +2653,7 @@ TESTCASE("SR_DD_2_LCP", "")
   TC_PROPERTY("ALL", 1);
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_2);
   FINALIZER(runClearTable);
@@ -2647,6 +2662,7 @@ TESTCASE("SR_DD_2b_LCP", "")
 {
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_2);
   FINALIZER(runClearTable);
 }
@@ -2654,6 +2670,7 @@ TESTCASE("SR_DD_3", "")
 {
   TC_PROPERTY("ALL", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_3);
   FINALIZER(runClearTable);
@@ -2661,6 +2678,7 @@ TESTCASE("SR_DD_3", "")
 TESTCASE("SR_DD_3b", "")
 {
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_3);
   FINALIZER(runClearTable);
 }
@@ -2669,6 +2687,7 @@ TESTCASE("SR_DD_3_LCP", "")
   TC_PROPERTY("ALL", 1);
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runStopper);
   STEP(runSR_DD_3);
   FINALIZER(runClearTable);
@@ -2677,6 +2696,7 @@ TESTCASE("SR_DD_3b_LCP", "")
 {
   TC_PROPERTY("LCP", 1);
   INITIALIZER(runWaitStarted);
+  INITIALIZER(clearOldBackups);
   STEP(runSR_DD_3);
   FINALIZER(runClearTable);
 }

=== modified file 'storage/ndb/test/run-test/autotest-boot.sh'
--- a/storage/ndb/test/run-test/autotest-boot.sh	2011-06-01 08:55:03 +0000
+++ b/storage/ndb/test/run-test/autotest-boot.sh	2011-06-10 15:38:50 +0000
@@ -243,9 +243,9 @@ fi
 if [ "$build" ]
 then
     rm -rf $install_dir
-    
-	if [ -z "$clone1" ]
-	then
+    p=`pwd`
+    if [ -z "$clone1" ]
+    then
         cd $dst_place0
         if [ `uname | grep -ic cygwin || true` -ne 0 ]
         then
@@ -255,18 +255,19 @@ then
             cmd /c devenv.com MySql.sln /Build RelWithDebInfo
             cmd /c devenv.com MySql.sln /Project INSTALL /Build
         else
-	        BUILD/compile-ndb-autotest --prefix=$install_dir0
-	        make install
-        fi
-	else
-	    cd $dst_place0
 	    BUILD/compile-ndb-autotest --prefix=$install_dir0
 	    make install
-	    
-	    cd $dst_place1
-	    BUILD/compile-ndb-autotest --prefix=$install_dir1
-	    make install
-	fi
+        fi
+    else
+	cd $dst_place0
+	BUILD/compile-ndb-autotest --prefix=$install_dir0
+	make install
+	
+	cd $dst_place1
+	BUILD/compile-ndb-autotest --prefix=$install_dir1
+	make install
+    fi
+    cd $p
 fi
 
 

=== modified file 'storage/ndb/test/src/NdbBackup.cpp'
--- a/storage/ndb/test/src/NdbBackup.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/src/NdbBackup.cpp	2011-06-10 12:50:28 +0000
@@ -64,7 +64,7 @@ NdbBackup::clearOldBackups()
      * Clear old backup files
      */ 
     BaseString tmp;
-    tmp.assfmt("ssh -v %s rm -rf %s/BACKUP", host, path);
+    tmp.assfmt("ssh %s rm -rf %s/BACKUP", host, path);
   
     ndbout << "buf: "<< tmp.c_str() <<endl;
     int res = system(tmp.c_str());  
@@ -107,6 +107,7 @@ loop:
     {
       NdbSleep_SecSleep(3);
       _backup_id += 100;
+      user_backup_id += 100;
       goto loop;
     }
     

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into mysql-5.5-cluster branch (magnus.blaudd:3356) magnus.blaudd16 Jun