1SET foreign_key_checks=0; 2CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB; 3CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB; 4SET foreign_key_checks=1; 5SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2'); 6COUNT(*) 72 8SET foreign_key_checks=0; 9DROP TABLE t1, t2; 10