List:Commits« Previous MessageNext Message »
From:tomas Date:July 4 2007 10:03am
Subject:bk commit into 5.1 tree (tomas:1.2552)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-07-04 10:03:31+02:00, tomas@stripped +11 -0
  Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-6.2
  into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco
  MERGE: 1.2514.1.53

  mysql-test/t/disabled.def@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.258.1.2

  mysql-test/t/ndb_alter_table.test@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.39.2.1

  mysql-test/t/ndb_autodiscover3.test@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.12.2.1

  sql/ha_ndbcluster.cc@stripped, 2007-07-04 10:03:28+02:00, tomas@stripped +5 -12
    manual merge
    MERGE: 1.472.1.6

  sql/ha_ndbcluster.h@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.182.1.2

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.180.1.2

  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-07-04 09:53:37+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.154.1.3

  storage/ndb/src/kernel/blocks/lgman.cpp@stripped, 2007-07-04 09:53:36+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.30.1.1

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp@stripped, 2007-07-04 09:53:37+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.82.1.1

  storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-07-04 09:53:37+02:00, tomas@stripped +0 -3
    Auto merged
    MERGE: 1.66.1.3

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-07-04 09:53:37+02:00, tomas@stripped +0 -4
    Auto merged
    MERGE: 1.112.1.7

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-telco/RESYNC

--- 1.483/sql/ha_ndbcluster.cc	2007-07-03 17:23:32 +02:00
+++ 1.484/sql/ha_ndbcluster.cc	2007-07-04 10:03:28 +02:00
@@ -277,20 +277,6 @@
   return error;
 }
 
-/*
-  When execute() is called, this resets the internal state on things that
-  were awaiting execute(), such as pending scan take-over operations and
-  rows for batched operations.
-  Also used to initialize the state at start of a statement.
-*/
-void ha_ndbcluster::reset_state_at_execute()
-{
-  Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
-  m_ops_pending= 0;
-  m_blobs_pending= FALSE;
-  thd_ndb->m_unsent_bytes= 0;
-}
-
 static int
 check_completed_operations(NdbTransaction *trans, const NdbOperation *first)
 {
@@ -318,14 +304,15 @@
   DBUG_ENTER("execute_no_commit");
   h->release_completed_operations(trans, force_release);
   const NdbOperation *first= trans->getFirstDefinedOperation();
+  Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
   if (trans->execute(NdbTransaction::NoCommit,
                       NdbOperation::AO_IgnoreError,
                       h->m_force_send))
   {
-    h->reset_state_at_execute();
+    thd_ndb->m_unsent_bytes= 0;
     DBUG_RETURN(-1);
   }
-  h->reset_state_at_execute();
+  thd_ndb->m_unsent_bytes= 0;
   if (!h->m_ignore_no_key || trans->getNdbError().code == 0)
     DBUG_RETURN(trans->getNdbError().code);
 
@@ -337,12 +324,15 @@
 {
   DBUG_ENTER("execute_commit");
   const NdbOperation *first= trans->getFirstDefinedOperation();
+  Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
   if (trans->execute(NdbTransaction::Commit,
                      NdbOperation::AO_IgnoreError,
                      force_send))
   {
+    thd_ndb->m_unsent_bytes= 0;
     DBUG_RETURN(-1);
   }
+  thd_ndb->m_unsent_bytes= 0;
   if (!ignore_error || trans->getNdbError().code == 0)
     DBUG_RETURN(trans->getNdbError().code);
   DBUG_RETURN(check_completed_operations(trans, first));
@@ -352,18 +342,12 @@
 int execute_commit(ha_ndbcluster *h, NdbTransaction *trans)
 {
   int res= execute_commit(trans, h->m_force_send, h->m_ignore_no_key);
-  h->reset_state_at_execute();
   return res;
 }
 
 inline
 int execute_commit(THD *thd, NdbTransaction *trans)
 {
-  /*
-    We do not have to reset_state_at_execute() here, as this is at transaction
-    end time, and we will not take further action after this (nor can we
-    easily, as we execute outside the context of the ha_ndbcluster object).
-  */
   return execute_commit(trans, thd->variables.ndb_force_send, FALSE);
 }
 
@@ -376,7 +360,8 @@
   int res= trans->execute(NdbTransaction::NoCommit,
                           NdbOperation::AO_IgnoreError,
                           h->m_force_send);
-  h->reset_state_at_execute();
+  Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
+  thd_ndb->m_unsent_bytes= 0;
   DBUG_RETURN(res);
 }
 
@@ -594,6 +579,7 @@
   Thd_ndb *thd_ndb= get_thd_ndb(thd);
   thd_ndb->count++;
   thd_ndb->m_error= FALSE;
+  thd_ndb->m_unsent_bytes= 0;
   DBUG_VOID_RETURN;
 }
 
@@ -5186,7 +5172,8 @@
     DBUG_ASSERT(m_active_trans);
     // Start of transaction
     m_rows_changed= 0;
-    reset_state_at_execute();
+    m_ops_pending= 0;
+    m_blobs_pending= FALSE;
     m_slow_path= thd_ndb->m_slow_path;
 #ifdef HAVE_NDB_BINLOG
     if (unlikely(m_slow_path))
@@ -5302,7 +5289,6 @@
     trans= ndb->startTransaction();
     if (trans == NULL)
       ERR_RETURN(ndb->getNdbError());
-    reset_state_at_execute();
     no_uncommitted_rows_reset(thd);
     thd_ndb->stmt= trans;
     thd_ndb->query_state&= NDB_QUERY_NORMAL;
@@ -5310,7 +5296,8 @@
   }
   m_active_trans= trans;
   // Start of statement
-  reset_state_at_execute();
+  m_ops_pending= 0;
+  m_blobs_pending= FALSE;
   thd->set_current_stmt_binlog_row_based_if_mixed();
 
   DBUG_RETURN(error);

--- 1.186/sql/ha_ndbcluster.h	2007-06-18 07:38:38 +02:00
+++ 1.187/sql/ha_ndbcluster.h	2007-07-04 09:53:36 +02:00
@@ -576,7 +576,6 @@
 
   void release_completed_operations(NdbTransaction*, bool);
 
-  void reset_state_at_execute();
   friend int execute_commit(ha_ndbcluster*, NdbTransaction*);
   friend int execute_commit(NdbTransaction *, int, int);
   friend int execute_no_commit_ignore_no_key(ha_ndbcluster*, NdbTransaction*);
Thread
bk commit into 5.1 tree (tomas:1.2552)tomas4 Jul