diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-10-09 15:49:13 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2008-10-09 15:49:13 +0500 |
commit | 1e4f12d65dff1532f9922e714e1cd672127acb17 (patch) | |
tree | 4dd114a067665ead4db8b458d2ef58771c4c9d21 /sql/sql_table.cc | |
parent | 56810c9d6560f073ec09078a139f059e9d3ea01f (diff) | |
download | mariadb-git-1e4f12d65dff1532f9922e714e1cd672127acb17.tar.gz |
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.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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 || |