ERROR 1005 (HY000): (errno: 150) details for show create table and innodb status given

2011-02-22 Thread hari jayaram
Hi I am getting a Foreign key error . The command that gives the error is ALTER TABLE child ADD CONSTRAINT child_parent_fk FOREIGN KEY (id) REFERENCES parent(id) ON DELETE NO ACTION ON UPDATE NO ACTION; And the error message is ERROR 1005 (HY000): Can't create table

Re: ERROR 1005 (HY000): (errno: 150) details for show create table and innodb status given

2011-02-22 Thread hari jayaram
the best answer we could provide :) On 2/22/2011 13:00, hari jayaram wrote: Hi I am getting a Foreign key error . ... I have attached the create table syntax for both the parent and child tables and the innodb status below. ... mysql show innodb status

Re: ERROR 1005 (HY000): (errno: 150) details for show create table and innodb status given

2011-02-22 Thread hari jayaram
parent(id) ON DELETE NO ACTION ON UPDATE NO ACTION; Query OK, 0 rows affected (0.24 sec) Records: 0 Duplicates: 0 Warnings: 0 Thanks for your prompt help. Hari On Tue, Feb 22, 2011 at 2:13 PM, hari jayaram hari...@gmail.com wrote: Thanks shawn for your reply. Your simplification