Bug #970 cannot import dump from mysql-dump
Submitted: 31 Jul 2003 13:26 Modified: 31 Jul 2003 22:59
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version: OS:
Assigned to: CPU Architecture:Any

[31 Jul 2003 13:26] [ name withheld ]
Description:
/usr/local/mysql/bin/mysqldump  Ver 9.08 Distrib 4.0.13, for pc-linux (i686) 
/usr/local/mysql/bin/mysql  Ver 12.20 Distrib 4.0.13, for pc-linux (i686) 
 
# mysql devbj2 < devbj.sql 
ERROR 1005 at line 29277: Can't create table './devbj2/backup_blocks.frm' (errno: 150) 
 
 

How to repeat:
 
Create emtpy db. 
Create data w/ foreign keys in it. 
 (I installed Slash from slashcode.com, installed a site, and then ran mysql-dump  
on that site's database). 
So dump the data out w/ mysql-dump. 
Create another empty db, different name from the first. 
Try importing that dump into the new #2 db. 
 

Suggested fix:
none
[31 Jul 2003 22:59] Heikki Tuuri
Hi!

Please put

SET FOREIGN_KEY_CHECKS=0;

to the start of the dump file(s).

Regards,

Heikki