Am Tue, 07 Dec 2004 10:28:58 +0200 schrieb Heikki Tuuri:

> Jochen,
> 
> ----- Original Message ----- 
> From: "Jochen Witte" <[EMAIL PROTECTED]>
> Newsgroups: mailing.database.myodbc
> Sent: Tuesday, December 07, 2004 2:41 AM
> Subject: error 1005 (errno150)
> 
> 
>> Hello,
>>
>> I try to set up replication and woulkd like to export my master with
>> mysqldump. The import fails with ERROR 1005 (HY000) (errno 150)when trying
>> to import the dump on the slave. The create-state which causes the error
>> is:
>>
>> CREATE TABLE fond4client (
>>  id int(11) NOT NULL auto_increment,
>>  fond_id int(11) NOT NULL default '0',
>>  client_id int(11) NOT NULL default '0',
>>  price_buy double NOT NULL default '-1',
>>  price_sell double NOT NULL default '-1',
>>  import_history_id int(11) default NULL,
>>  active char(1) NOT NULL default '',
>>  PRIMARY KEY  (id),
>>  KEY fond4client_import_hist_id_idx (import_history_id),
>>  KEY fond4client_client_id_idx (client_id),
>>  KEY fond4client_active_idx (active),
>>  CONSTRAINT `0_34` FOREIGN KEY (`import_history_id`) REFERENCES 
>> `import_history` (`id`),
>>  CONSTRAINT `0_35` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`)
>> ) TYPE=InnoDB;
> 
> please post
> 
> SHOW CREATE TABLE import_history_id;
> SHOW CREATE TABLE client_id;
> 
> After the failing create, run
> 
> SHOW INNODB STATUS;
> 
> and post the output.
> 
> http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html
> 
>> master is: 4.0.17
>> slave: 4.1.7
>>
>> Trying to insert the dump on another 4.0.17 fails too.
>> Any hints out there?
>>
>> Regards
>> Jochen
> 
> Best regards,
> 
> Heikki Tuuri
> Innobase Oy
> Foreign keys, transactions, and row level locking for MySQL
> InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM 
> tables
> http://www.innodb.com/order.php


OK - this gets me nearer to the problem: the referenced tables do not
exist yet - they are created later through the dump. I abstain from
pasting the output, since the problem is pretty clear. I disabled
foreign-key checks, so this is not the problem...

Regards
Jochen




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to