According to the documentation (emphasis mine):
TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 65,535 (216 − 1) characters. The effective maximum length is less if the value contains multibyte characters. Each TEXT value is stored using a 2-byte length prefix that indicates the number of bytes in the value.
Would it be more accurate to say that a TEXT
column can store 65535 bytes? What is the specific impact of multibyte characters in a TEXT
column?
Here's the source of my confusion:
In MySQL 5, CHAR
and VARCHAR
fields were changed so that they count characters instead of bytes (e.g., you can fit "你好,世界!" into a VARCHAR(6)
). Did TEXT
fields get the same treatment, or do they still count bytes?