SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET NAMES utf8; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `fkinnar`; USE `fkinnar`; CREATE TABLE `b` ( `idb` int(10) unsigned NOT NULL auto_increment, `valueb` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`idb`) ) TYPE=InnoDB; INSERT INTO `b` (`idb`,`valueb`) VALUES (1,1),(2,2),(3,3); CREATE TABLE `c` ( `ida` int(10) unsigned NOT NULL default '0', `idb` int(10) unsigned NOT NULL default '0' ) TYPE=InnoDB; INSERT INTO `c` (`ida`,`idb`) VALUES (1,1),(2,1),(3,1),(4,1),(5,2),(3,2),(1,2),(2,3),(4,3); CREATE TABLE `a` ( `ida` int(10) unsigned NOT NULL auto_increment, `valuea` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`ida`) ) TYPE=InnoDB; INSERT INTO `a` (`ida`,`valuea`) VALUES (1,1),(2,2),(3,3),(4,4),(5,5); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT; SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS; SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;