MySQL Forums
Forum List  »  InnoDB

#1005 - Can't create table './pbparse/#sql-cb3_42b1.frm' (errno: 150)
Posted by: mike schmitt
Date: November 05, 2007 08:08AM

I want to begin by saying I am very new to mysql and don't know all that much about it. I am trying to get an application to run on my debian box which requires the use of a mysql database. I have successfully created the database named 'pbparse' and also created all the tables successfully. The problem is when I try and alter one of the tables. Here are the relavent sql queries I am working with and hopefully someone can find a problem in the code.

CREATE TABLE names (n_id INT(6) AUTO_INCREMENT, name VARCHAR(36) BINARY, pname VARCHAR(36), PRIMARY KEY (n_id), UNIQUE (name))

CREATE TABLE guids (g_id INT(6) AUTO_INCREMENT, guid CHAR(32), PRIMARY KEY (g_id), UNIQUE (guid))

CREATE TABLE name_guid_bridge (n_id int(6), g_id int(6)) ENGINE=InnoDB


|------------Problem happens with this sql query----------------------------|

ALTER TABLE name_guid_bridge ADD FOREIGN KEY (n_id) REFERENCES names(n_id) ON DELETE CASCADE, ADD FOREIGN KEY (g_id) REFERENCES guids(g_id) ON DELETE CASCADE

Options: ReplyQuote


Subject
Views
Written By
Posted
#1005 - Can't create table './pbparse/#sql-cb3_42b1.frm' (errno: 150)
9361
November 05, 2007 08:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.