Batara, thank you for the bug report. I have to fix this bug when I overhaul the foreign key constraint naming conventions.
Yes, to fix the problem you can drop the foreign key constraint manually in the slave. Best regards, Heikki Tuuri Innobase Oy http://www.innodb.com Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - hot backup tool for InnoDB which also backs up MyISAM tables Order MySQL technical support from https://order.mysql.com/ ----- Original Message ----- From: "Batara Kesuma" <[EMAIL PROTECTED]> Newsgroups: mailing.database.myodbc Sent: Wednesday, December 03, 2003 6:41 AM Subject: Drop foreign key replication problem > Hi, > > I am running a master and a slave. When I created a foreign key in > master, it looked like this: > CONSTRAINT `0_373` FOREIGN KEY (`prefecture_id`) REFERENCES `prefecture` > (`id`) > > But on the slave it was like: > CONSTRAINT `0_451` FOREIGN KEY (`prefecture_id`) REFERENCES `prefecture` > (`id`) > > The problem is, when I deleted this foreign key on master using command: > ALTER TABLE input DROP FOREIGN KEY 0_373 > > The slave produced an error: > ERROR: 1025 Error on rename of './new_atpress/input' to > './new_atpress/#sql2-3a54-2' (errno: 140) > 031203 13:27:30 Slave: Error 'Error on rename of './new_atpress/input' > to './new_atpress/#sql2-3a54-2' (errno: 140)' on query 'alter table > input drop foreign key 0_373'. Default database: 'new_atpress', > Error_code: 1025 > 031203 13:27:30 Error running query, slave SQL thread aborted. Fix the > problem, and restart the slave SQL thread with "SLAVE START". We stopped > at log 'borneo-bin.010' position 901130237 > > Versions: > MySQL 4.0.15 > Linux 2.4.18 > > I guess this is because the constraint name difference of the foreign > keys. How do I fix this problem? Can I just manually drop the foreign > key on slave and skip this "alter table input drop foreign key 0_373"? > How to do it? Please help, and thank you very much. > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]