Re: Problems in Foreign Key Syntax

2001-12-24 Thread Heikki Tuuri
Patrick, I wasn't on the list when the thread below started, but I saw it on google and wanted to add some more information, but this time, my columns aren't char based and I get the same error. Here's my SQL:CREATE TABLE `user` ( `user_id` int(11) NOT NULL auto_increment, `username`

Re: Problems in Foreign Key Syntax

2001-12-24 Thread Heikki Tuuri
Amit, when you recreate a dropped table, its table definition must match existing foreign key references to it. Since MySQL silently changes many char columns to varchar columns, it is best to use varchar in all foreign key columns currently. Upcoming 3.23.47 fixes the problem, because in .47

Re: Problems in Foreign Key Syntax

2001-12-24 Thread Patrick Burleson
Heikki, I did end up reading that bit before you sent this to the list, but before I could send the follow up I wanted. I have added the creation of the index to my create statement, but I get the same error. Here is the sql as it stands now: CREATE TABLE `user` ( `user_id` int(11)

Re: Problems in Foreign Key Syntax

2001-12-24 Thread Heikki Tuuri
Patrick, Heikki, I did end up reading that bit before you sent this to the list, but before I could send the follow up I wanted. I have added the creation of the index to my create statement, but I get the same error. Here is the sql as it stands now: CREATE TABLE `user` ( `user_id`

Re: Problems in Foreign Key Syntax

2001-12-24 Thread Philip Molter
On Mon, Dec 24, 2001 at 11:31:45PM +0200, Heikki Tuuri wrote: : Use the following: : : CREATE TABLE `wishlist` ( : `wishlist_id` int(11) NOT NULL auto_increment, : `user_id` int(11) NOT NULL, : PRIMARY KEY (`wishlist_id`), : INDEX

RE: Problems in Foreign Key Syntax

2001-12-23 Thread Matthew Smith
functionality. M -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: 22 December 2001 18:03 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Problems in Foreign Key Syntax Hi! Ok, I looked in the manual and found the following: http://www.mysql.com/doc/S/i

Re: Problems in Foreign Key Syntax

2001-12-23 Thread Michael Widenius
Hi! Heikki == Heikki Tuuri [EMAIL PROTECTED] writes: Heikki Hi! Heikki Ok, I looked in the manual and found the following: Heikki http://www.mysql.com/doc/S/i/Silent_column_changes.html cut Heikki So the bug is actually a 'feature'. Of course it would be better if the Heikki parser would

Re: Problems in Foreign Key Syntax

2001-12-23 Thread Patrick Burleson
I wasn't on the list when the thread below started, but I saw it on google and wanted to add some more information, but this time, my columns aren't char based and I get the same error. Here's my SQL: CREATE TABLE `user` ( `user_id` int(11) NOT NULL auto_increment, `username` varchar(30)

Problems in Foreign Key Syntax

2001-12-23 Thread amit lonkar
Hi!! I have been trying to create the following tables:- 1) create table scenario ( scenario char(10) not null primary key, copyfromscenario char(10)) type = innodb; 2) create table attributekit( attributekit char(25) not null primary key, expression blob not null, linkoperator char(5)

Problems in Foreign Key Syntax

2001-12-22 Thread amit lonkar
Hi!! I am trying create the following tables:- CREATE TABLE Scenario ( Scenario CHAR(10) NOT NULL PRIMARY KEY, CopyFromScenario CHAR(10)) TYPE = InnoDB; CREATE TABLE Attribute( Attribute CHAR(25) NOT NULL PRIMARY KEY, Type CHAR(25)) TYPE = InnoDB; CREATE TABLE AttributeValue( Attribute

Re: Problems in Foreign Key Syntax

2001-12-22 Thread Heikki Tuuri
Amit, thank you for a bug report. There seems to be a bug in the MySQL parser, because MySQL internally makes the first column of the table AttributeValue as of type VARCHAR(25), though you have declared it as CHAR(25). Since the internal type of the referenced column is CHAR(25) but the

Re: Problems in Foreign Key Syntax

2001-12-22 Thread Heikki Tuuri
://www.innodb.com for the online manual and latest news on InnoDB Date: Sat, 22 Dec 2001 19:45:24 To: [EMAIL PROTECTED] From: Heikki Tuuri [EMAIL PROTECTED] Subject: Re: Problems in Foreign Key Syntax Amit, thank you for a bug report. There seems to be a bug in the MySQL parser, because MySQL internally