At which point does MySQL start treating VARCHAR cols like TEXT cols? At which point does MySQL start treating VARCHAR cols like TEXT cols? database database

At which point does MySQL start treating VARCHAR cols like TEXT cols?


Short answer: A "long" VARCHAR is a normal VARCHAR and will be inline.

MySQL won't magically start treating a straight VARCHAR as a text type. It'll always be stored inline. With 5.0.3, the upper limit for VARCHARs was relaxed to 65,535 bytes. They also take up 2 bytes of header if over 255 characters. This limit is still applied to the maximum row size of 65,535 bytes. A LONG VARCHAR is actually a different type which backcompats to MEDIUMTEXT.

See: http://dev.mysql.com/doc/refman/5.0/en/char.html and http://dev.mysql.com/doc/refman/5.0/en/blob.html