1
drop database if exists bug_1315130_a;
2
create database bug_1315130_a;
4
create table parent_table (a int unsigned primary key);
5
create table child_table_in_same_schema (a int unsigned primary key, constraint a_fk foreign key a_fk (a) references parent_table(a));
6
drop database if exists bug_1315130_b;
7
create database bug_1315130_b;
9
create table child_table_in_second_schema (a int unsigned primary key, constraint a_fk foreign key a_fk (a) references bug_1315130_a.parent_table(a));
10
create table parent_table (a int unsigned primary key);
11
create table bug_1315130_a.child_table_in_same_schema_referencing_second_schema (a int unsigned primary key, constraint a_fk2 foreign key a_fk2 (a) references bug_1315130_b.parent_table(a));