I have a question about a discrepancy in the 5.0 manual regarding the maximum size of Varbinary field types.
Section 11.4.1 states:
Values in VARCHAR columns are variable-length strings. In MySQL 5.0, the length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions.
Section 11.4.2 states:
The allowable maximum length is the same for BINARY and VARBINARY as it is for CHAR and VARCHAR, except that the length for BINARY and VARBINARY is a length in bytes rather than in characters.
However, Section 11.5 "Column Storage Requirements" says that the Storage Required for Varbinary column types is:
L+1 bytes, where L <= M and 0 <= M <= 255
This does not align with the Storage Required for Varchar fields:
L+1 bytes, where L <= M and 0 <= M <= 65535 (see note below).
This was 0 <= M <= 255 before MySQL 5.0.3.
So what is the actual maximum supported length of Varbinary fields? And shouldn't someone clarify the manual on this point?
Best Regards,
David Gurecki
References:
Section 11.4.1:
http://dev.mysql.com/doc/refman/5.0/en/char.html
Section 11.4.2:
http://dev.mysql.com/doc/refman/5.0/en/binary-varbinary.html
Section 11.5:
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html