List:Commits« Previous MessageNext Message »
From:tomas Date:October 10 2007 6:13am
Subject:bk commit into 5.1 tree (tomas:1.2624)
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-10-10 08:13:18+02:00, tomas@stripped +2 -0
  removal of current_thd and some not needed helper fucntions

  sql/ha_ndbcluster.cc@stripped, 2007-10-10 08:13:15+02:00, tomas@stripped +5 -19
    removal of current_thd and some not needed helper fucntions

  sql/ha_ndbcluster.h@stripped, 2007-10-10 08:13:15+02:00, tomas@stripped +0 -2
    removal of current_thd and some not needed helper fucntions

diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc	2007-10-09 15:38:46 +02:00
+++ b/sql/ha_ndbcluster.cc	2007-10-10 08:13:15 +02:00
@@ -432,7 +432,7 @@ int execute_no_commit(ha_ndbcluster *h, 
   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);
+  Thd_ndb *thd_ndb= h->m_thd_ndb;
   if (trans->execute(NdbTransaction::NoCommit,
                       NdbOperation::AO_IgnoreError,
                       h->m_force_send))
@@ -448,11 +448,10 @@ int execute_no_commit(ha_ndbcluster *h, 
 }
 
 inline
-int execute_commit(NdbTransaction *trans, int force_send, int ignore_error)
+int execute_commit(Thd_ndb *thd_ndb, NdbTransaction *trans, int force_send, int ignore_error)
 {
   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))
@@ -473,19 +472,6 @@ int execute_commit(NdbTransaction *trans
 }
 
 inline
-int execute_commit(ha_ndbcluster *h, NdbTransaction *trans)
-{
-  int res= execute_commit(trans, h->m_force_send, h->m_ignore_no_key);
-  return res;
-}
-
-inline
-int execute_commit(THD *thd, NdbTransaction *trans)
-{
-  return execute_commit(trans, thd->variables.ndb_force_send, FALSE);
-}
-
-inline
 int execute_no_commit_ie(ha_ndbcluster *h, NdbTransaction *trans,
 			 bool force_release)
 {
@@ -4998,7 +4984,7 @@ ha_ndbcluster::flush_bulk_insert()
   }
   else
   {
-    if (execute_commit(this,trans) != 0)
+    if (execute_commit(m_thd_ndb, trans, m_force_send, m_ignore_no_key) != 0)
     {
       no_uncommitted_rows_execute_failure();
       DBUG_RETURN(ndb_err(trans));
@@ -5520,11 +5506,11 @@ static int ndbcluster_commit(handlerton 
 
   if (thd->slave_thread)
   {
-    res= execute_commit(trans, 1, TRUE);
+    res= execute_commit(thd_ndb, trans, 1, TRUE);
   }
   else
   {
-    res= execute_commit(thd,trans);
+    res= execute_commit(thd_ndb, trans, thd->variables.ndb_force_send, FALSE);
   }
 
   if (res != 0)
diff -Nrup a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
--- a/sql/ha_ndbcluster.h	2007-10-09 15:38:46 +02:00
+++ b/sql/ha_ndbcluster.h	2007-10-10 08:13:15 +02:00
@@ -637,8 +637,6 @@ private:
   int write_conflict_row(NdbTransaction*, const NdbOperation*, NdbError&);
   friend int check_completed_operations(Thd_ndb*, ha_ndbcluster*, NdbTransaction*,
                                         const NdbOperation*);
-  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*);
   friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*, bool);
   friend int execute_no_commit_ie(ha_ndbcluster*, NdbTransaction*, bool);
Thread
bk commit into 5.1 tree (tomas:1.2624)tomas10 Oct