List:General Discussion« Previous MessageNext Message »
From:Adam Date:April 28 2004 3:48pm
Subject:Re: Create table results in (errno: 121)
View as plain text  
Tom,

More specifically, find out what the error messages means by using the 
`SHOW INNODB STATUS` command. This will give a description of the last 
error message generated by InnoDb. In your case, its definitely the 
foreign key that is causing the problem. As far as what it is 
specifically, I'd reference the message, and if that doesn't help bring 
the message to the group.

Regards,
Adam

On Apr 22, 2004, at 9:29 AM, Tom Brown wrote:

> Hi,
>
> I'm trying to create a table with the following syntax
>
> CREATE TABLE TNSession
> (
> SessionID int(11) NOT NULL auto_increment,
> IPAddress varchar(50) default NULL,
> Created datetime default NULL,
> Expired tinyint(4) default '0',
> AccountID int(11) default '0',
> PRIMARY KEY (SessionID),
> KEY FK_AccountID (AccountID),
> CONSTRAINT `0_20` FOREIGN KEY (`AccountID`) REFERENCES `TNAccount`
> (`AccountID`)
> ) TYPE=InnoDB ROW_FORMAT=DYNAMIC;
>
> it results in a
>
> ERROR 1005: Can't create table './TNMailServer/TNSession.frm' (errno: 
> 121)
>
> This is on version mysql-standard-4.0.18-pc-linux-i686
>
> Can anyone shed any light on this as it has me stumped - There is a
> TNAccount table with a AccountID column?
>
> thanks for any assistance
>
> Tom
>
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=1
>



This electronic mail transmission contains confidential information intended only for the
person(s) named. Any use, distribution, copying or disclosure by another person is
strictly prohibited.
Thread
Create table results in (errno: 121)Tom Brown22 Apr
  • Re: Create table results in (errno: 121)Martijn Tonies22 Apr
  • Re: Create table results in (errno: 121)Tom Brown22 Apr
  • Re: Create table results in (errno: 121)Adam28 Apr
    • urban myth?Boyd E. Hemphill3 May
      • Re: urban myth?Peter J Milanese3 May
      • Re: urban myth?Daniel Clark3 May
      • Re: urban myth?Garth Webb3 May
        • Re: urban myth?Bob Ramsey3 May
          • Re: urban myth?Josh Trutwin3 May
          • Re: urban myth?Garth Webb3 May
          • Re: urban myth?Michael Stassen3 May
            • RE: urban myth?Boyd E. Hemphill3 May
              • Re: urban myth?Anders Karlsson3 May
              • Re: urban myth?Michael T. Babcock13 May
      • Re: urban myth?Josh Trutwin3 May
      • Re: urban myth?Jeremy Zawodny3 May
      • Re: urban myth?gerald_clark3 May
        • Re: urban myth?Peter J Milanese3 May
Re: Create table results in (errno: 121)beacker22 Apr
RE: urban myth?Mike Johnson3 May
Re: urban myth?Udikarni3 May