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 `w

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 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
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 yo

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` v

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) NO

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 Heikki> So the bug is actually a 'feature'. Of course it would be better if the Heikki> pars

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-22 Thread Heikki Tuuri
ps://order.mysql.com/ See http://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

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 referri