Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > How do I look up error description

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-14-03, 22:17
whiter whiter is offline
Registered User
 
Join Date: Jul 2003
Posts: 6
Unhappy How do I look up error description

I'm running the following SQL command:-

ALTER TABLE `entity` ADD FOREIGN KEY ( `lc_eg_group` ) REFERENCES `entity_group` ( `eg_code` ) ON UPDATE CASCADE ON DELETE RESTRICT

MySQL said:

Can't create table '.\db-folder\#sql-84c_54.frm' (errno: 150)

OK ... now how do I look up an "errno:" by error number ?
ie: How do I look up *any* error number, not just 150.
(Yes! I have checked the manual - but can't find a comprehensive list of errors, or any means to look up a particular error number)

ALSO - What is error number 150 ??
What is the solution??
(NOTE: I have created several other referential constraints on the "entity" table, and they were all ok - just this one fails)

(Presumably table "#sql-84c_54.frm" is used to implement the constraint?)
Reply With Quote
  #2 (permalink)  
Old 07-15-03, 04:30
omiossec omiossec is offline
Registered User
 
Join Date: Jan 2003
Location: Paris, France
Posts: 320
First did you use INNODB table
Second the code may be
foreign key lc_eg_group (column) references entity_group (eg_code) on UPDATE CASCADE ON DELETE RESTRICT

Second are you sure that you create indices for this foreign key ?
__________________
Olivier Miossec
--
http://www.lasso-developpeur.net/
--
Reply With Quote
  #3 (permalink)  
Old 07-15-03, 06:55
whiter whiter is offline
Registered User
 
Join Date: Jul 2003
Posts: 6
Quote:
Originally posted by omiossec
Q. First did you use INNODB table
A. Yes

Q. Second are you sure that you create indices for this foreign key ?
A. Yes.


Hi Olivier,

Thanks for ideas about the problem, however, I wasn't after just trying to get the Alter Table ... Add constraint to work.

*** I was after how to look up an error number in the documentation for MySQL. ANY error number, not just error number 150.
Reply With Quote
  #4 (permalink)  
Old 07-18-03, 12:46
carneeki carneeki is offline
Registered User
 
Join Date: Dec 2001
Location: Sydney, Australia
Posts: 4
I use www.google.com.au!

But I am considering compiling a repository of all the error codes and posting them up somewhere so that user's can add new codes as they become figured out with many of the common causes.

Has anyone already done this, maybe I don't need to...


adam
Reply With Quote
  #5 (permalink)  
Old 07-18-03, 15:16
omiossec omiossec is offline
Registered User
 
Join Date: Jan 2003
Location: Paris, France
Posts: 320
Quote:
Originally posted by whiter
Hi Olivier,

Thanks for ideas about the problem, however, I wasn't after just trying to get the Alter Table ... Add constraint to work.

*** I was after how to look up an error number in the documentation for MySQL. ANY error number, not just error number 150.


To get an explanation of an error code you can use perror
__________________
Olivier Miossec
--
http://www.lasso-developpeur.net/
--
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On