1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-28 17:36:30 +03:00

Merge revisions from maria/5.5 (5.5.41)

bzr merge -r4393 lp:maria/5.5
This commit is contained in:
Nirbhay Choubey
2014-12-22 20:09:25 -05:00
68 changed files with 1796 additions and 256 deletions

View File

@@ -6305,6 +6305,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.