List:Commits« Previous MessageNext Message »
From:Martin Skold Date:March 13 2008 2:42pm
Subject:bk commit into 5.1 tree (mskold:1.2556) BUG#31233
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mskold.  When mskold 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, 2008-03-13 15:42:38+01:00, mskold@stripped +1 -0
  bug#31233 mysql_alter_table() fails to drop UNIQUE KEY: Wrong offset

  sql/sql_table.cc@stripped, 2008-03-13 15:42:29+01:00, mskold@stripped +2 -2
    bug#31233 mysql_alter_table() fails to drop UNIQUE KEY: Wrong offset

diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2008-03-13 15:31:26 +01:00
+++ b/sql/sql_table.cc	2008-03-13 15:42:29 +01:00
@@ -5348,7 +5348,7 @@ compare_tables(THD *thd,
 
           *alter_flags|= HA_DROP_UNIQUE_INDEX;
           key_part= table_key->key_part;
-          end= key_part + new_key->key_parts;
+          end= key_part + table_key->key_parts;
 
          /*
             Check if all fields in key are declared
@@ -5358,7 +5358,7 @@ compare_tables(THD *thd,
           {
             is_not_null=
               (is_not_null && 
-               (!table->field[key_part->fieldnr]->maybe_null()));
+               (!table->field[key_part->fieldnr-1]->maybe_null()));
           }
           if (is_not_null)
             candidate_key_count--;
Thread
bk commit into 5.1 tree (mskold:1.2556) BUG#31233Martin Skold13 Mar