List:Commits« Previous MessageNext Message »
From:Ole John Aske Date:June 16 2011 10:23am
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch
(ole.john.aske:3504)
View as plain text  
#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:ole.john.aske@stripped

 3504 Ole John Aske	2011-06-16 [merge]
      merge telco-7-0 to spj branch

    modified:
      storage/ndb/include/mgmapi/mgmapi_config_parameters.h
      storage/ndb/src/kernel/blocks/dbspj/DbspjMain.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/mgmsrv/ConfigInfo.cpp
      storage/ndb/src/ndbapi/NdbQueryBuilder.hpp
      storage/ndb/src/ndbapi/ndberror.c
=== 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/dbspj/DbspjMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp	2011-06-07 12:08:29 +0000
+++ b/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp	2011-06-16 08:37:10 +0000
@@ -4418,7 +4418,7 @@ Dbspj::scanIndex_build(Build_context& ct
     if (requestPtr.p->m_bits & Request::RT_REPEAT_SCAN_RESULT &&
        !treeNodePtr.p->m_ancestors.contains(ctx.m_scans))
     {
-      nodePtr.p->m_bits |= TreeNode::T_SCAN_REPEATABLE;
+      treeNodePtr.p->m_bits |= TreeNode::T_SCAN_REPEATABLE;
     }
 
     ctx.m_scan_cnt++;
@@ -5025,6 +5025,8 @@ Dbspj::scanIndex_parent_batch_repeat(Sig
 
   DEBUG("scanIndex_parent_batch_repeat(), m_node_no: " << treeNodePtr.p->m_node_no
         << ", m_batch_chunks: " << data.m_batch_chunks);
+  
+  ndbassert(treeNodePtr.p->m_bits & TreeNode::T_SCAN_REPEATABLE);
 
   /**
    * Register index-scans to be restarted if we didn't get all

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-05-26 15:04:45 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2011-06-16 10:23:39 +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-06-07 12:19:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2011-06-16 10:23:39 +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/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/NdbQueryBuilder.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryBuilder.hpp	2011-04-14 08:59:45 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryBuilder.hpp	2011-06-16 10:23:39 +0000
@@ -358,7 +358,7 @@ private:
  *
  * - The NdbQueryDef produced by the ::prepare() method has a lifetime 
  *   until it is explicit released by NdbQueryDef::release()
- *  
+ *
  */
 class NdbQueryBuilder 
 {

=== modified file 'storage/ndb/src/ndbapi/ndberror.c'
--- a/storage/ndb/src/ndbapi/ndberror.c	2011-06-15 10:40:26 +0000
+++ b/storage/ndb/src/ndbapi/ndberror.c	2011-06-16 10:23:39 +0000
@@ -317,6 +317,8 @@ 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" },
+  { 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" },

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3504) Ole John Aske16 Jun