1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

mysql-5.5.41 merge

This commit is contained in:
Sergei Golubchik
2014-12-19 11:35:44 +01:00
58 changed files with 1579 additions and 246 deletions

View File

@ -6245,6 +6245,18 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
}
/*
If foreign key is added then check permission to access parent table.
In function "check_fk_parent_table_access", create_info->db_type is used
to identify whether engine supports FK constraint or not. Since
create_info->db_type is set here, check to parent table access is delayed
till this point for the alter operation.
*/
if ((alter_info->flags & ALTER_FOREIGN_KEY) &&
check_fk_parent_table_access(thd, create_info, alter_info))
goto err;
/*
If this is an ALTER TABLE and no explicit row type specified reuse
the table's row type.