List:Commits« Previous MessageNext Message »
From:tomas Date:January 5 2006 4:07pm
Subject:bk commit into 5.1 tree (tomas:1.2042)
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
  1.2042 06/01/05 17:07:13 tomas@stripped +3 -0
  removed lock flags not needed

  sql/ha_ndbcluster_binlog.h
    1.2 06/01/05 17:07:01 tomas@stripped +2 -3
    removed lock flags not needed

  sql/ha_ndbcluster_binlog.cc
    1.4 06/01/05 17:07:01 tomas@stripped +3 -4
    removed lock flags not needed

  sql/ha_ndbcluster.cc
    1.232 06/01/05 17:07:01 tomas@stripped +11 -14
    removed lock flags not needed

# 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:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-wl2325-v6

--- 1.231/sql/ha_ndbcluster.cc	2006-01-05 15:47:36 +01:00
+++ 1.232/sql/ha_ndbcluster.cc	2006-01-05 17:07:01 +01:00
@@ -114,7 +114,7 @@
 static byte *ndbcluster_get_key(NDB_SHARE *share,uint *length,
                                 my_bool not_used __attribute__((unused)));
 #ifdef HAVE_NDB_BINLOG
-static int rename_share(NDB_SHARE *share, const char *new_key, bool have_lock);
+static int rename_share(NDB_SHARE *share, const char *new_key);
 #endif
 static void ndb_set_fragmentation(NDBTAB &tab, TABLE *table, uint pk_len);
 
@@ -3924,8 +3924,7 @@
 #ifdef HAVE_NDB_BINLOG
     ndbcluster_create_binlog_setup(get_ndb(), name2, m_dbname, m_tabname,
                                    ndb_binlog_thread_running > 0 &&
-                                   !IS_TMP_PREFIX(m_tabname),
-                                   0, TRUE);
+                                   !IS_TMP_PREFIX(m_tabname), 0);
 #endif /* HAVE_NDB_BINLOG */
     DBUG_RETURN(my_errno);
   }
@@ -4086,7 +4085,7 @@
       uint length= (uint) strlen(key);
       if ((share= (NDB_SHARE*) hash_search(&ndbcluster_open_tables,
                                            (byte*) key, length)))
-        handle_trailing_share(share, TRUE);
+        handle_trailing_share(share);
     }
     /*
       get a new share
@@ -4239,7 +4238,7 @@
   if (ndb_binlog_thread_running > 0 &&
       (share= get_share(from, false)))
   {
-    int r= rename_share(share, to, TRUE);
+    int r= rename_share(share, to);
     DBUG_ASSERT(r == 0);
   }
 #endif
@@ -4253,7 +4252,7 @@
 #ifdef HAVE_NDB_BINLOG
     if (share)
     {
-      int r= rename_share(share, from, TRUE);
+      int r= rename_share(share, from);
       DBUG_ASSERT(r == 0);
       free_share(&share);
     }
@@ -5063,8 +5062,7 @@
           pthread_mutex_lock(&LOCK_open);
           ndbcluster_create_binlog_setup(ndb, key, elmt.database, elmt.name,
                                          ndb_binlog_thread_running > 0 &&
-                                         !IS_TMP_PREFIX(elmt.name),
-                                         share, TRUE);
+                                         !IS_TMP_PREFIX(elmt.name), share);
           pthread_mutex_unlock(&LOCK_open);
         }
         else
@@ -5203,8 +5201,7 @@
         pthread_mutex_unlock(&ndbcluster_mutex);
         pthread_mutex_lock(&LOCK_open);
         ndbcluster_create_binlog_setup(ndb, name, db, file_name,
-                                       !IS_TMP_PREFIX(file_name),
-                                       share, TRUE);
+                                       !IS_TMP_PREFIX(file_name), share);
         pthread_mutex_unlock(&LOCK_open);
         pthread_mutex_lock(&ndbcluster_mutex);
       }
@@ -5980,7 +5977,7 @@
   
   Must be called with previous pthread_mutex_lock(&ndbcluster_mutex)
 */
-int handle_trailing_share(NDB_SHARE *share, bool have_lock)
+int handle_trailing_share(NDB_SHARE *share)
 {
   static ulong trailing_share_id= 0;
   DBUG_ENTER("handle_trailing_share");
@@ -5988,7 +5985,7 @@
   ++share->use_count;
   pthread_mutex_unlock(&ndbcluster_mutex);
 
-  close_cached_tables((THD*) 0, 0, (TABLE_LIST*) 0, have_lock);
+  close_cached_tables((THD*) 0, 0, (TABLE_LIST*) 0, TRUE);
 
   pthread_mutex_lock(&ndbcluster_mutex);
   if (!--share->use_count)
@@ -6050,7 +6047,7 @@
 /*
   Rename share is used during rename table.
 */
-static int rename_share(NDB_SHARE *share, const char *new_key, bool have_lock)
+static int rename_share(NDB_SHARE *share, const char *new_key)
 {
   NDB_SHARE *tmp;
   pthread_mutex_lock(&ndbcluster_mutex);
@@ -6059,7 +6056,7 @@
                               share->key, share->key_length));
   if ((tmp= (NDB_SHARE*) hash_search(&ndbcluster_open_tables,
                                      (byte*) new_key, new_length)))
-    handle_trailing_share(tmp, have_lock);
+    handle_trailing_share(tmp);
 
   /* remove the share from hash */
   hash_delete(&ndbcluster_open_tables, (byte*) share);

--- 1.3/sql/ha_ndbcluster_binlog.cc	2006-01-05 15:47:36 +01:00
+++ 1.4/sql/ha_ndbcluster_binlog.cc	2006-01-05 17:07:01 +01:00
@@ -1606,8 +1606,7 @@
                                    const char *db,
                                    const char *table_name,
                                    bool do_binlog,
-                                   NDB_SHARE *share,
-                                   bool have_lock)
+                                   NDB_SHARE *share)
 {
   DBUG_ENTER("ndbcluster_create_binlog_setup");
 
@@ -1619,10 +1618,10 @@
     share= (NDB_SHARE*) hash_search(&ndbcluster_open_tables,
                                     (byte*) key, strlen(key));
     if (share)
-      handle_trailing_share(share, have_lock);
+      handle_trailing_share(share);
   }
   else
-    handle_trailing_share(share, have_lock);
+    handle_trailing_share(share);
   
   /* Create share which is needed to hold replication information */
   if (!(share= get_share(key, true, true)))

--- 1.1/sql/ha_ndbcluster_binlog.h	2006-01-05 12:02:09 +01:00
+++ 1.2/sql/ha_ndbcluster_binlog.h	2006-01-05 17:07:01 +01:00
@@ -72,8 +72,7 @@
                                    const char *db,
                                    const char *table_name,
                                    bool do_binlog,
-                                   NDB_SHARE *share,
-                                   bool have_lock);
+                                   NDB_SHARE *share);
 int ndbcluster_create_event(Ndb *ndb, const NDBTAB *table,
                             const char *event_name, NDB_SHARE *share);
 int ndbcluster_create_event_ops(NDB_SHARE *share,
@@ -121,7 +120,7 @@
 NDB_SHARE *ndbcluster_get_share(NDB_SHARE *share);
 void ndbcluster_free_share(NDB_SHARE **share, bool have_lock);
 void ndbcluster_real_free_share(NDB_SHARE **share);
-int handle_trailing_share(NDB_SHARE *share, bool have_lock);
+int handle_trailing_share(NDB_SHARE *share);
 inline NDB_SHARE *get_share(const char *key,
                             bool create_if_not_exists= TRUE,
                             bool have_lock= FALSE)
Thread
bk commit into 5.1 tree (tomas:1.2042)tomas5 Jan