List:Commits« Previous MessageNext Message »
From:tomas Date:March 29 2006 2:08pm
Subject:bk commit into 5.1 tree (tomas:1.1998) BUG#18614
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.1998 06/03/29 16:08:16 tomas@stripped +3 -0
  Bug #18614 ndb: mysqld hangs in alter table

  sql/sql_base.cc
    1.279 06/03/29 16:08:09 tomas@stripped +5 -3
    Bug #18614 ndb: mysqld hangs in alter table

  sql/mysql_priv.h
    1.338 06/03/29 16:08:09 tomas@stripped +1 -1
    Bug #18614 ndb: mysqld hangs in alter table

  sql/ha_ndbcluster.cc
    1.241 06/03/29 16:08:09 tomas@stripped +1 -1
    Bug #18614 ndb: mysqld hangs in alter table

# 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/wl2325-alcatel

--- 1.337/sql/mysql_priv.h	2005-10-21 07:06:47 +02:00
+++ 1.338/sql/mysql_priv.h	2006-03-29 16:08:09 +02:00
@@ -1014,7 +1014,7 @@
 bool remove_table_from_cache(THD *thd, const char *db, const char *table,
                              uint flags);
 
-bool close_cached_tables(THD *thd, bool wait_for_refresh, TABLE_LIST *tables);
+bool close_cached_tables(THD *thd, bool wait_for_refresh, TABLE_LIST *tables, bool have_lock = FALSE);
 void copy_field_from_tmp_record(Field *field,int offset);
 bool fill_record(THD *thd, Field **field, List<Item> &values,
                  bool ignore_errors);

--- 1.278/sql/sql_base.cc	2005-11-16 11:25:21 +01:00
+++ 1.279/sql/sql_base.cc	2006-03-29 16:08:09 +02:00
@@ -264,13 +264,14 @@
 */
 
 bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
-			 TABLE_LIST *tables)
+			 TABLE_LIST *tables, bool have_lock)
 {
   bool result=0;
   DBUG_ENTER("close_cached_tables");
   DBUG_ASSERT(thd || (!if_wait_for_refresh && !tables));
 
-  VOID(pthread_mutex_lock(&LOCK_open));
+  if (!have_lock)
+    VOID(pthread_mutex_lock(&LOCK_open));
   if (!tables)
   {
     while (unused_tables)
@@ -342,7 +343,8 @@
     for (TABLE *table=thd->open_tables; table ; table= table->next)
       table->s->version= refresh_version;
   }
-  VOID(pthread_mutex_unlock(&LOCK_open));
+  if (!have_lock)
+    VOID(pthread_mutex_unlock(&LOCK_open));
   if (if_wait_for_refresh)
   {
     pthread_mutex_lock(&thd->mysys_var->mutex);

--- 1.240/sql/ha_ndbcluster.cc	2006-03-24 14:26:38 +01:00
+++ 1.241/sql/ha_ndbcluster.cc	2006-03-29 16:08:09 +02:00
@@ -6084,7 +6084,7 @@
   ++share->use_count;
   pthread_mutex_unlock(&ndbcluster_mutex);
 
-  close_cached_tables((THD*) 0, 0, (TABLE_LIST*) 0);
+  close_cached_tables((THD*) 0, 0, (TABLE_LIST*) 0, TRUE);
 
   pthread_mutex_lock(&ndbcluster_mutex);
   if (!--share->use_count)
Thread
bk commit into 5.1 tree (tomas:1.1998) BUG#18614tomas29 Mar