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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user