List:Commits« Previous MessageNext Message »
From:dlenev Date:March 24 2006 8:06pm
Subject:bk commit into 5.0 tree (dlenev:1.2112) BUG#18153
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev 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.2112 06/03/24 22:06:24 dlenev@stripped +1 -0
  Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on transactional
  tables corrupt triggers".
  
  It turned out that we also have relied at certian places that
  (new_table != table_name) were always true on Windows and for transactional
  tables. Since our fix for the bug brakes this assumption we have to add new
  flag to pass this information around.
  This code needs to be refactored but I dare not to do this in 5.0.

  sql/sql_table.cc
    1.300 06/03/24 22:06:19 dlenev@stripped +3 -1
    mysql_alter_table():
      Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on
      transactional tables corrupt triggers". It turned out that we also have
      relied at certian places that (new_table != table_name) were always true
      on Windows and for transactional tables. Since our fix for the bug brakes
      this assumption we have to add new flag to pass this information around.
      This code needs to be refactored but I dare not to do this in 5.0.

# 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:	dlenev
# Host:	jabberwock.site
# Root:	/home/dlenev/mysql-5.0-bg18153

--- 1.299/sql/sql_table.cc	2006-03-24 14:58:13 +03:00
+++ 1.300/sql/sql_table.cc	2006-03-24 22:06:19 +03:00
@@ -3182,6 +3182,7 @@
   uint db_create_options, used_fields;
   enum db_type old_db_type,new_db_type;
   bool need_copy_table;
+  bool force_close_table= FALSE;
   DBUG_ENTER("mysql_alter_table");
 
   thd->proc_info="init";
@@ -3833,6 +3834,7 @@
     */
     close_cached_table(thd, table);
     table=0;					// Marker that table is closed
+    force_close_table= TRUE;
   }
 #if (!defined( __WIN__) && !defined( __EMX__) && !defined( OS2))
   else
@@ -3871,7 +3873,7 @@
     VOID(pthread_mutex_unlock(&LOCK_open));
     goto err;
   }
-  if (thd->lock || new_name != table_name)	// True if WIN32
+  if (thd->lock || new_name != table_name || force_close_table)  // True if WIN32
   {
     /*
       Not table locking or alter table with rename
Thread
bk commit into 5.0 tree (dlenev:1.2112) BUG#18153dlenev24 Mar