mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
cleanup: key->key_create_info.check_for_duplicate_indexes -> key->old
mark old keys in the ALTER TABLE with the `old` flag, not with the `key_create_info.check_for_duplicate_indexes`. This allows to mark old foreign keys too.
This commit is contained in:
@ -177,7 +177,7 @@ Key::Key(const Key &rhs, MEM_ROOT *mem_root)
|
||||
name(rhs.name),
|
||||
option_list(rhs.option_list),
|
||||
generated(rhs.generated), invisible(false),
|
||||
without_overlaps(rhs.without_overlaps), period(rhs.period)
|
||||
without_overlaps(rhs.without_overlaps), old(rhs.old), period(rhs.period)
|
||||
{
|
||||
list_copy_and_replace_each_value(columns, mem_root);
|
||||
}
|
||||
@ -285,6 +285,8 @@ bool Foreign_key::validate(List<Create_field> &table_fields)
|
||||
List_iterator<Key_part_spec> cols(columns);
|
||||
List_iterator<Create_field> it(table_fields);
|
||||
DBUG_ENTER("Foreign_key::validate");
|
||||
if (old)
|
||||
DBUG_RETURN(FALSE); // must be good
|
||||
while ((column= cols++))
|
||||
{
|
||||
it.rewind();
|
||||
|
Reference in New Issue
Block a user