RE: Foreign Key Reference to a VARCHAR

2004-02-10 Thread Sven Woltmann
Sven > -Original Message- > From: Jochem van Dieten [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 10. Februar 2004 15:29 > To: Heikki Tuuri > Cc: [EMAIL PROTECTED] > Subject: Re: Foreign Key Reference to a VARCHAR > > Heikki Tuuri wrote: > > > > I guess that 4

Re: Foreign Key Reference to a VARCHAR

2004-02-10 Thread Jochem van Dieten
Heikki Tuuri wrote: I guess that 4-byte UTF8 characters are not needed. You can code 16 million characters with 3 bytes. Yes. But is that also the case if you use the UTF-8 encoding scheme, or can that scheme code less characters with 3 bytes? http://ln.hixie.ch/?start=1064324988&order=-1&count=1

Re: Foreign Key Reference to a VARCHAR

2004-02-10 Thread Heikki Tuuri
languages on Earth. Thank you, Heikki - Alkuperäinen viesti - Lähettäjä: "Sven Woltmann" <[EMAIL PROTECTED]> Vastaanottaja: "Heikki Tuuri" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Lähetetty: Tuesday, February 10, 2004 3:53 PM Aihe: RE: Foreign Key Reference

RE: Foreign Key Reference to a VARCHAR

2004-02-10 Thread Sven Woltmann
ks again, Sven > -Original Message- > From: Heikki Tuuri [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 10. Februar 2004 14:19 > To: [EMAIL PROTECTED] > Subject: Re: Foreign Key Reference to a VARCHAR > > Sven, > > are you using the UTF8 charset? Then a single chara

Re: Foreign Key Reference to a VARCHAR

2004-02-10 Thread Heikki Tuuri
Sven, are you using the UTF8 charset? Then a single character may use up to 3 bytes. Since MySQL cannot work with index columns longer than 255 bytes, for columns CHAR(86) or longer, MySQL must define a 'column prefix' index, if you define an index on the column. That is, MySQL internally creates

Foreign Key Reference to a VARCHAR

2004-02-09 Thread Sven Woltmann
Hi, I hope this is not a well known problem since I just signed up to this list. But I checked the February archive and couldn't find anything on this. I was trying for a couple of hours now to create a foreign key reference on a varchar field: CREATE TABLE users ( loginVARCHA