summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-04-07 10:47:46 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-04-23 13:05:15 +0300
commit19e3597e0c718a4cfdfe8789c7b4b11a4e0ba0c6 (patch)
treeebd56557b6ff1d6a0731fab4e0c9a64a07621324 /sql/sql_table.cc
parent0ea4c73dae689fb80e2c1c1cc347a917534edfae (diff)
downloadmariadb-git-19e3597e0c718a4cfdfe8789c7b4b11a4e0ba0c6.tar.gz
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.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 024ca9b58e1..2cd36ceb4de 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -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;
/*