summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <mskold@linux.site>2006-06-14 13:45:30 +0200
committerunknown <mskold@linux.site>2006-06-14 13:45:30 +0200
commited6bd84fee76b95a20981605f0a78a55f3fb6e8e (patch)
treec5414472f5f8d98452e7316bf458623cf73ec524 /sql/sql_table.cc
parent9df1f3859702e993e940bd32deed931506766ba5 (diff)
parent708740c8bb5e80a6b5e32f196c2bd14b5da03855 (diff)
downloadmariadb-git-ed6bd84fee76b95a20981605f0a78a55f3fb6e8e.tar.gz
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/marty/MySQL/mysql-5.1 sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 5bc7e49a40c..4bc84521f2a 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4709,6 +4709,14 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
At the moment we can't handle altering temporary tables without a copy.
We also test if OPTIMIZE TABLE was given and was mapped to alter table.
In that case we always do full copy.
+
+ 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.
*/
if (table->s->fields != create_list->elements ||
table->s->db_type != create_info->db_type ||
@@ -4718,6 +4726,7 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET ||
(alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) ||
order_num ||
+ !table->s->mysql_version ||
(table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar))
DBUG_RETURN(ALTER_TABLE_DATA_CHANGED);