1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE

InnoDB requires a full table rebuild for foreign key changes.
It was not possible in compare_tables() to detect such changes.

On Heikkis proposal I added a new flag to the syntax parser
where foreign key definition changes are done. I test for
this flag in compare_tables() now.
This commit is contained in:
ingo@mysql.com
2006-03-30 20:55:54 +02:00
parent da000b2d2a
commit 7253099cf3
5 changed files with 63 additions and 5 deletions

View File

@ -3781,7 +3781,7 @@ static uint compare_tables(TABLE *table, List<create_field> *create_list,
create_info->used_fields & HA_CREATE_USED_ENGINE ||
create_info->used_fields & HA_CREATE_USED_CHARSET ||
create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET ||
(alter_info->flags & ALTER_RECREATE) ||
(alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) ||
order_num)
DBUG_RETURN(ALTER_TABLE_DATA_CHANGED);