From 1e4f12d65dff1532f9922e714e1cd672127acb17 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 9 Oct 2008 15:49:13 +0500 Subject: Bug#39372 "Smart" ALTER TABLE not so smart after all. The problem was that PACK_KEYS and MAX_ROWS clause in ALTER TABLE did not trigger table reconstruction. The fix is to rebuild a table if PACK_KEYS or MAX_ROWS are specified. mysql-test/r/alter_table.result: test result mysql-test/t/alter_table.test: test case sql/sql_table.cc: The problem was that PACK_KEYS and MAX_ROWS clause in ALTER TABLE did not trigger table reconstruction. The fix is to rebuild a table if PACK_KEYS or MAX_ROWS are specified. --- sql/sql_table.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 243324764f5..4fdd88bbec3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5281,6 +5281,8 @@ compare_tables(TABLE *table, create_info->used_fields & HA_CREATE_USED_CHARSET || create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET || create_info->used_fields & HA_CREATE_USED_ROW_FORMAT || + create_info->used_fields & HA_CREATE_USED_PACK_KEYS || + create_info->used_fields & HA_CREATE_USED_MAX_ROWS || (alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) || order_num || !table->s->mysql_version || -- cgit v1.2.1