List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 21 2006 11:24am
Subject:bk commit into 5.0 tree (svoj:1.2094) BUG#17001
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
  1.2094 06/04/21 16:24:31 svoj@april.(none) +1 -0
  BUG#17001 - Table and server crash on ALTER TABLE
  
  frm and data files for tables created by earlier (prior to 5.0.3) MySQL
  versions becomes out of sync after certain ALTER TABLE statements:
  - One that changes column default value;
  - One that changes table comment;
  - One that changes table password.
  
  As a result one can expirience either server crash or data corruption/loss.
  
  This fix ensures that running ALTER TABLE on tables created by earlier
  (prior to 5.0.3) MySQL versions recreates data files.

  sql/sql_table.cc
    1.304 06/04/21 16:24:26 svoj@april.(none) +2 -1
    Ensure that running ALTER TABLE on tables created by earlier
    (prior to 5.0.3) MySQL versions recreates data files.

# 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:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG17001/mysql-5.0

--- 1.303/sql/sql_table.cc	2006-03-30 18:14:51 +05:00
+++ 1.304/sql/sql_table.cc	2006-04-21 16:24:26 +05:00
@@ -3665,7 +3665,8 @@
                     ~(ALTER_CHANGE_COLUMN_DEFAULT|ALTER_OPTIONS) ||
                     (create_info->used_fields &
                      ~(HA_CREATE_USED_COMMENT|HA_CREATE_USED_PASSWORD)) ||
-                    table->s->tmp_table);
+                    table->s->tmp_table ||
+                    table->s->mysql_version < 50300);
   create_info->frm_only= !need_copy_table;
 
   /*
Thread
bk commit into 5.0 tree (svoj:1.2094) BUG#17001Sergey Vojtovich21 Apr