MySQL Forums
Forum List  »  Docs

Re: text length in bytes or chars?
Posted by: Mike Hillyer
Date: September 08, 2005 02:16PM

The linked page explicitly explains this:

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. Lengths for these types in columns specifications indicate number of characters from MySQL 4.1 on. The number of extra bytes for recording lengths for variable-length data types is unchanged. For example, L+1 bytes to store a TINYTEXT value before MySQL 4.1 becomes L characters + 1 byte to store the length as of MySQL 4.1.

Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535
Mobile: +1 403-330-0870
Blog: http://www.openwin.org/mike

Options: ReplyQuote


Subject
Views
Written By
Posted
17172
September 04, 2005 07:55PM
Re: text length in bytes or chars?
7177
September 08, 2005 02:16PM
7901
September 08, 2005 07:07PM
4101
September 09, 2005 09:16AM
3896
September 11, 2005 08:48PM
3768
September 11, 2005 09:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.