Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    6

    Unhappy Unanswered: 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?)

  2. #2
    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/
    --

  3. #3
    Join Date
    Jul 2003
    Posts
    6
    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.

  4. #4
    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

  5. #5
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    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/
    --

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •