List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:July 18 2007 12:39pm
Subject:bk commit into 5.0 tree (svoj:1.2529) BUG#28838
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj 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-18 15:39:13+05:00, svoj@stripped +1 -0
  BUG#28838 - duplicate external_lock in mysql_alter_table
  
  Removed duplicate call to handler::external_lock() when
  ALTER TABLE that doesn't need to copy a table (quick
  ALTER TABLE) was executed.
  
  Also quick ALTER TABLE doesn't hold LOCK_open anymore when
  it enables/disables indexes.

  sql/sql_table.cc@stripped, 2007-07-18 15:39:11+05:00, svoj@stripped +1 -3
    Do not call handler::external_lock() as table is already locked
    by open_ltable().
    
    Also do not hold LOCK_open mutex for alter_table_manage_keys() as
    this function doesn't require LOCK_open (LOCK_open is required by
    wait_while_table_is_used() only).

diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2007-06-15 20:46:58 +05:00
+++ b/sql/sql_table.cc	2007-07-18 15:39:11 +05:00
@@ -3789,11 +3789,9 @@ view_err:
   {
     VOID(pthread_mutex_lock(&LOCK_open));
     wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
-    table->file->external_lock(thd, F_WRLCK);
+    VOID(pthread_mutex_unlock(&LOCK_open));
     alter_table_manage_keys(table, table->file->indexes_are_disabled(),
                             alter_info->keys_onoff);
-    table->file->external_lock(thd, F_UNLCK);
-    VOID(pthread_mutex_unlock(&LOCK_open));
     error= ha_commit_stmt(thd);
     if (ha_commit(thd))
       error= 1;
Thread
bk commit into 5.0 tree (svoj:1.2529) BUG#28838Sergey Vojtovich18 Jul
  • Re: bk commit into 5.0 tree (svoj:1.2529) BUG#28838Sergei Golubchik19 Jul