I created a mysqldump with --quote-names option, but I get this
error:C:\xampp\xampp\mysql\bin>mysql -uroot db2 < test5.txtERROR 1005 at
line 54: Can't create table '.\db2\shift.frm' (errno:
150)C:\xampp\xampp\mysql\bin>Line 54 is the CREATE TABLE... line of the following
bit of SQL from the file, and the original database created on the same server works
fine.How is it that mysqldump can successfully create the sql file, but the code it has
generated fails to create a new database. Can any one say what might be wrong with the
foreign key format (err 150) or mysqldump.exe
I have MySQL 4.0.18 and mysqldump Ver 9.10 Distrib 4.0.17, for Win95/Win98 (i32) as
supplied to me.Andrew HCREATE TABLE `shift` ( `staff` char(20) NOT NULL default '',
`shift` char(1) NOT NULL default '', `client` char(20) default NULL, `role` char(1)
default NULL, `on` date NOT NULL default '0000-00-00', PRIMARY KEY
(`staff`,`shift`,`on`), KEY `staff` (`staff`,`role`), KEY `shift` (`shift`), KEY
`client` (`client`), KEY `role` (`role`), CONSTRAINT `shift_ibfk_1` FOREIGN KEY
(`staff`, `role`) REFERENCES `staffrole` (`uniquename`, `role`), CONSTRAINT
`shift_ibfk_2` FOREIGN KEY (`shift`) REFERENCES `shifttype` (`shift`), CONSTRAINT
`shift_ibfk_3` FOREIGN KEY (`client`) REFERENCES `client` (`uniquename`), CONSTRAINT
`shift_ibfk_4` FOREIGN KEY (`staff`) REFERENCES `staff` (`uniquename`), CONSTRAINT
`shift_ibfk_5` FOREIGN KEY (`role`) REFERENCES `roletype` (`role`)) TYPE=InnoDB;