MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:June 1 2006 1:09pm
Subject:bk commit into 5.0 tree (svoj:1.2165) BUG#6236
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.2165 06/06/01 18:08:57 svoj@stripped +1 -0
  BUG#19192 - CHECK TABLE EXTENDED / REPAIR TABLE show no errors.
              ALTER TABLE crashes
  Executing fast alter table (one that doesn't need to copy data)
  on tables created by mysql versions prior to 4.0.25 could result
  in posterior server crash when accessing these tables.
  
  There was a bug prior to mysql-4.0.25. Number of null fields was
  calculated incorrectly. As a result frm and data files gets out of
  sync after fast alter table. There is no way to determine by which
  mysql version (in 4.0 and 4.1 branches) table was created, thus we
  disable fast alter table for all tables created by mysql versions
  prior to 5.0 branch.
  See BUG#6236.

  sql/sql_table.cc
    1.313 06/06/01 18:08:51 svoj@stripped +9 -0
    There was a bug prior to mysql-4.0.25. Number of null fields was
    calculated incorrectly. As a result frm and data files gets out of
    sync after fast alter table. There is no way to determine by which
    mysql version (in 4.0 and 4.1 branches) table was created, thus we
    disable fast alter table for all tables created by mysql versions
    prior to 5.0 branch.
    See BUG#6236.

# 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:	may.pils.ru
# Root:	/home/svoj/devel/mysql/BUG19192/mysql-5.0

--- 1.312/sql/sql_table.cc	2006-05-30 10:45:17 +05:00
+++ 1.313/sql/sql_table.cc	2006-06-01 18:08:51 +05:00
@@ -3614,12 +3614,21 @@
     their layout. See Field_string::type() for details.
     Thus, if the table is too old we may have to rebuild the data to
     update the layout.
+
+    There was a bug prior to mysql-4.0.25. Number of null fields was
+    calculated incorrectly. As a result frm and data files gets out of
+    sync after fast alter table. There is no way to determine by which
+    mysql version (in 4.0 and 4.1 branches) table was created, thus we
+    disable fast alter table for all tables created by mysql versions
+    prior to 5.0 branch.
+    See BUG#6236.
   */
   need_copy_table= (alter_info->flags &
                     ~(ALTER_CHANGE_COLUMN_DEFAULT|ALTER_OPTIONS) ||
                     (create_info->used_fields &
                      ~(HA_CREATE_USED_COMMENT|HA_CREATE_USED_PASSWORD)) ||
                     table->s->tmp_table ||
+                    !table->s->mysql_version ||
                     (table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar));
   create_info->frm_only= !need_copy_table;
 
Thread
bk commit into 5.0 tree (svoj:1.2165) BUG#6236Sergey Vojtovich1 Jun