1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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:
Jan Lindström
2016-04-07 10:47:46 +03:00
parent 0ea4c73dae
commit 19e3597e0c
5 changed files with 113 additions and 7 deletions

View File

@ -47,7 +47,8 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
TABLE_LIST *create_table);
bool check_fk_parent_table_access(THD *thd,
HA_CREATE_INFO *create_info,
Alter_info *alter_info);
Alter_info *alter_info,
const char* create_db);
bool parse_sql(THD *thd,
Parser_state *parser_state,