List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:June 10 2005 3:50pm
Subject:Re: Text Encoding
View as plain text  
Hi!

On Jun 10, Hagen Höpfner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ok, the next question ;-)
> 
> If I have a table with an utf8 coded char(1) attribute and insert the
> value "a" this is stored as 0x61 20 20. The output of "SHOW CHARACTER
> TYPES" mentioned a maximal length. However, it seems, that this maximal
> length is used even if one byte (like here) would be enough? I think,
> this is based on the idea of handling possible updates (e.g.. a->?) more
> efficient, but why do you call the character length to be maximal if it
> is used all the time?

Check the manual for the difference between CHAR and VARCHAR (in Column
types), and static vs. dynamic row format (in MyISAM section)
 
Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/  www.mysql.com
Thread
Text EncodingHagen Höpfner9 Jun
  • Re: Text EncodingSergei Golubchik10 Jun
    • Re: Text EncodingHagen Höpfner10 Jun
      • Re: Text EncodingSergei Golubchik10 Jun
        • Re: Text EncodingHagen Höpfner10 Jun
          • Re: Text EncodingSergei Golubchik10 Jun
            • Re: Text EncodingOlaf van der Spek10 Jun
              • Re: Text EncodingSergei Golubchik11 Jun