List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:August 24 2004 7:54am
Subject:Re: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.
View as plain text  
> > > > I have a questions about "varchar columns" change to "CHAR columns"
> > > > automatically.
>
> > > See http://dev.mysql.com/doc/mysql/en/Silent_column_changes.html
>
> > In addition to that - it doesn't really matter as the CHAR datatype
> > isn't properly implemented in MySQL and behaves the same as
> > the VARCHAR datatype.
>
> I don't believe that is correct. We recently had a very large disk
> space problem that was solved when we discovered that a column that
> should have been varchar was instead char, and was taking up excess
> storage because of it (which a datatype acting like varchar wouldn't
> do).

It should be noted that I wasn't talking about physical storage
but about the logical datatype. How things are stored on disk
is totally independant from the logical datatype - you can do
whatever you like with it.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com

Thread
Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Emi Lu16 Aug
  • Re: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Egor Egorov23 Aug
  • Re: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Martijn Tonies23 Aug
    • Re: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Joseph Cochran24 Aug
  • Re: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Martijn Tonies24 Aug
RE: Why "VARCHAR" TO "CHAR" automatically when the length less than 4.Victor Pendleton17 Aug