Just to follow up that 5.0.24 information schema has correct meta data for utf8 eg.
character_maximum_length:character_octet_length varchar(10) 10:30 varchar(64) 64:192 I think 5.0.15 was patched to fix transposed values but something else dodgy snuck in along the way to 22. I've checked Redhat EL4 and Windows. Cheers Angus -----Original Message----- From: ajohnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 August 2006 9:03 AM To: [email protected] Subject: RE: [Reactor for CF] maxlength and UTF8 (MySQL 5) I also ran into this last week. We're installing 5.0.24 on a Redhat 4 box today. I'll let you know how it goes. Angus Johnson -----Original Message----- From: Chris Blackwell [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 August 2006 7:04 AM To: [email protected] Subject: RE: [Reactor for CF] maxlength and UTF8 (MySQL 5) Ok well the expected results would be that.. CHARACTER_MAXIMUM_LENGTH should contain the character length of the field as in varchar(10) CHARACTER_OCTET_LENGTH should be the number of bytes used to store this Varchar(10) in a single byte character set SHOULD have an octet length of 10 in a single byte character set and 30 in UTF8. Maybe an upgrade to MySQL 5.0.24 might fix this? :) BTW what OS (and maybe filesystem) are you running, I will see if I can reproduce this error. Cheers, Chris > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Sean Corfield > Sent: 08 August 2006 21:34 > To: [email protected] > Subject: Re: [Reactor for CF] maxlength and UTF8 (MySQL 5) > > On 8/8/06, Chris Blackwell <[EMAIL PROTECTED]> wrote: > > I just tried changing the charset type on an existing table, and > > creating a new table with UTF8 columns (utf8/utf8_general_ci) and the > > schema shows the expected data > > That depends on what you "expected" :) > > > "COLUMN_TYPE","CHARACTER_MAXIMUM_LENGTH","CHARACTER_OCTET_LENGTH" > > "varchar(10)",10,30 > > "varchar(45)",45,135 > > Right but that was what surprised me. If I say varchar(10) and UTF8, I > *expected* a maxlength of 10 and an octet length of 30 or so. The > problem here is that if you want to store 10 UTF8 characters, you have > to essentially use varchar(40) to be safe. Not what I expected at all. > > > There is a bug on the MySQL site that describes exactly the problem you > > are reporting. http://bugs.mysql.com/bug.php?id=19236 > > I'm using 5.0.22 so I don't think that's the bug that affects me > although I just tried char(9) and got a maxlength of 3... *sigh* > > I'll just make my columns about three times wider than I need :) > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > Reactor for ColdFusion Mailing List > [email protected] > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
