mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-9142 :Adding Constraint with no database reference
results in ERROR 1046 (3D000) at line 13: No database selected. Use database from create table to foreign key database if nothing else is given.
This commit is contained in:
@@ -6305,7 +6305,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
till this point for the alter operation.
|
||||
*/
|
||||
if ((alter_info->flags & ALTER_FOREIGN_KEY) &&
|
||||
check_fk_parent_table_access(thd, create_info, alter_info))
|
||||
check_fk_parent_table_access(thd, create_info, alter_info, new_db))
|
||||
goto err;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user