MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:October 20 2004 8:41am
Subject:Re: Char to Varchar on Innodb
View as plain text  

> those 'silent column specification changes' affect all table types. That
> feature has caused lots of user questions over years. It is in the TODO to
> remove that feature from MySQL, because it is not standards compliant. In
> InnoDB, a reason to use a CHAR column in some cases is to reduce
> fragmentation if there are lots of updates to that column. A CHAR column
> takes a fixed space. Silent column specification changes in many cases
> defeat this optimization which would otherwise be available to users.

I had a very long discussion with someone about this...

He said the same as you.

IMO, this is rubbish. Why should a CHAR column take
up fixed space??

CHAR is a logical datatype. How you store it physically
is up to the database engine implemenation.

That means you can store it as number of flowers in a
vase, or whatever ;-)

No, seriously: there's no reason why you cannot store
CHARs as VARCHARs, or put an extra compression
over it, and return/use the values as char-padded values.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Upscene Productions

Char to Varchar on InnodbGary Richardson19 Oct
Re: Char to Varchar on InnodbHeikki Tuuri20 Oct
  • Re: Char to Varchar on InnodbMartijn Tonies20 Oct
  • Re: Char to Varchar on InnodbGary Richardson21 Oct
  • Re: Char to Varchar on InnodbHeikki Tuuri21 Oct