Re: Can't create foreign key

2010-05-14 Thread Prabhat Kumar
M > To: j...@msdlg.com > Cc: mysql@lists.mysql.com > Subject: Re: Can't create foreign key > > Haven't done this in a while, but I'm guessing that you can't create > both a constraint and an index with the same name? > > Type mismatch will in my experience most o

RE: Can't create foreign key

2010-05-14 Thread jc
the problem. Jesse -Original Message- From: Carsten Pedersen [mailto:cars...@bitbybit.dk] Sent: Friday, May 14, 2010 1:49 PM To: j...@msdlg.com Cc: mysql@lists.mysql.com Subject: Re: Can't create foreign key Haven't done this in a while, but I'm guessing that you can'

RE: Can't create foreign key

2010-05-14 Thread jc
To: j...@msdlg.com; mysql@lists.mysql.com Subject: RE: Can't create foreign key Perror 121 says: OS error code 121: Remote I/O error Which I'm not too sure why an ALTER to add an constraint would give that error. Normally though, foreign key errors are shown in the SHOW ENGINE INNODB S

Re: Can't create foreign key

2010-05-14 Thread Carsten Pedersen
Haven't done this in a while, but I'm guessing that you can't create both a constraint and an index with the same name? Type mismatch will in my experience most often generate an errno 150. / Carsten j...@msdlg.com skrev: I'm trying to create a foreign key by executing the following statement

RE: Can't create foreign key

2010-05-14 Thread Gavin Towey
Perror 121 says: OS error code 121: Remote I/O error Which I'm not too sure why an ALTER to add an constraint would give that error. Normally though, foreign key errors are shown in the SHOW ENGINE INNODB STATUS \G output, look for more details there. Regards, Gavin Towey -Original Messag

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. You can post a bug: http://dev.mysql.com/doc/refman/5.0/en/bug-reports.html Lola J. Lee Beno wrote: > Gleb Paharenko wrote: > >> Hello. >> >> The query which is works is: > > > > Thanks - just what I needed. Looks like I'll need to be extra careful > with sql scripts generated from

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Gleb Paharenko wrote: Hello. The query which is works is: Thanks - just what I needed. Looks like I'll need to be extra careful with sql scripts generated from Mysql Workbench, which is still alpha right now. -- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at http://www

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. The query which is works is: CREATE TABLE `Films` ( `FilmID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `MovieTitle` TEXT NULL ,`PitchText` TEXT NULL, `AmountBudgeted` DECIMAL(11, 0) NULL, `RatingID` INT(11) unsigned , `Summary` L

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Peter Brawley wrote: Lola, />And got this following error message: >ERROR 1072 (42000): Key column '(not null)' doesn't exist in table / Yes, it's telling you what;s wrong: to define a constraint on a key, the table def must first define the key. Looking over the script again, RatingID is b

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Peter Brawley
Lola, >And got this following error message: >ERROR 1072 (42000): Key column '(not null)' doesn't exist in table Yes, it's telling you what;s wrong: to define a constraint on a key, the table def must first define the key. PB - Lola J. Lee Beno wrote: I'm trying to create foreign

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Michael Stassen wrote: 1) I'm not sure what you are intending with "(`(not null)`)" in the middle of your foreign key definition, but that isn't valid mysql syntax. See the manual for the correct syntax . This is f

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Michael Stassen
Lola J. Lee Beno wrote: I'm trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max. I used Mysql WorkBench to create the database schema and had

re: Can't create FOREIGN KEY restraints on InnoDb tables

2003-02-26 Thread Egor Egorov
On Wednesday 26 February 2003 12:36, David Martin-Roche (ECE) wrote: > I had a problem with mySQL 3.23.55 running on Solaris and on Linux (this > problem doesn't occur in NT). When I'm creating the tables in the database, > the next error is always provoked: > > ERROR 1005 at line 54: Can't create

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2003-02-26 Thread Heikki Tuuri
David, http://www.innodb.com/ibman.html#InnoDB_foreign_keys: "Starting from 4.0.5 the InnoDB parser is aware of possible option lower_case_table_names you give in my.cnf." Upgrade to 4.0.11! Heikki Innobase Oy sql query ... Subject: Can't create FOREIGN KEY restraints on InnoDb ta

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-27 Thread Heikki Tuuri
MySQL-4.1 to return more diverse error messages. Regards, Heikki Innobase Oy - Original Message - From: "Erv Young" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Wednesday, June 26, 2002 1:19 PM Subject: Re: Can't create FOREIGN KEY restraints on InnoD

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-26 Thread Erv Young
At 11:55 AM 6/25/2002 -0400, Andy Dustman wrote: > From a usability perspective, since other databases don't seem to be so >picky about this sort of thing, InnoDB ought to (IMHO): > >a) Act on REFERENCES clauses (i.e. column type REFERENCES ref-table) >instead of ignoring them. > >b) Auto-create

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Andy Dustman
On Tue, 2002-06-25 at 10:54, Roger Baklund wrote: > Like Heikki said: your problem is probably that you don't have indexes on > the foreign keys. Setting an INDEX on each of those columns does fix the problem. It then does allow me to remove the NOT NULL from the tracks table as I originally ha

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Roger Baklund
* Andy Dustman > On Mon, 2002-06-24 at 17:50, Roger Baklund wrote: > > * [EMAIL PROTECTED] > > [...] > > > The referred to keys are the same type and are indexed (they are > > [...] > > > CREATE TABLE genres ( > > > genre_idSMALLINT NOT NULL PRIMARY KEY, > > [...] > > > genre_id

Re: Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Andy Dustman
On Tue, 2002-06-25 at 01:08, [EMAIL PROTECTED] wrote: > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > sql,query > > If you just reply to this message,

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Heikki Tuuri
"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Tuesday, June 25, 2002 1:16 AM Subject: Re: Can't create FOREIGN KEY restraints on InnoDb tables > * [EMAIL PROTECTED] > [...] > > The referred to keys are the same type and are indexed (they are >

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-24 Thread Roger Baklund
* [EMAIL PROTECTED] [...] > The referred to keys are the same type and are indexed (they are [...] > CREATE TABLE genres ( > genre_idSMALLINT NOT NULL PRIMARY KEY, [...] > genre_idSMALLINT, ...does not look the same to me... ;) -- Roger sql