On Aug 23, 2005, at 10:20 AM, Sunil Vishwas wrote:
I was looking into the storage requirement for the various data types
and
got confused by following comment:
'For the CHAR, VARCHAR, and TEXT types, L and M in the preceding table
should be interpreted as number of bytes before MySQL 4.1 and as
number
of
characters thereafter.'
Then I looked into other pages like
http://dev.mysql.com/doc/mysql/en/string-type-overview.html
<http://dev.mysql.com/doc/mysql/en/string-type-overview.html> and got
more
confuse.
How it would be possible to use the same storage size to store the
equal
number of characters and byte, if a character is not just a byte long?
For example UTF-8 based Unicode character may take 1 to 4 bytes.
There is the issue... before 4.1 the limit was a size, from 4.1
onwards the limit is the number of characters... So clearly from 4.1
onwards your table sizes may vary depending on your character set
choices.
Look at it like this... If you have a limit of 8 bytes on a password
field, and you convert your database to UTF-8 in 4.1 your password
could be much larger than 8 bytes, and may be truncated if the limit
were size based, instead it is character based. Allowing a full
conversion of data from 4.0 to 4.1 if managed correctly.
Best Regards, Bruce
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]