Description:
In 5.0.3, VARCHAR now is supposed to allow
column lengths up to 65535. It appears that
the maximum usable length is 65532:
mysql> create table t (c varchar(65535));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varchar(65534));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varchar(65533));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varchar(65532));
Query OK, 0 rows affected (0.03 sec)
The manual doesn't state that VARBINARY also should allow
a length up to 65535, but assuming that it should, VARBINARY
also fails in a similar way:
mysql> drop table t;
Query OK, 0 rows affected (0.01 sec)
mysql> create table t (c varbinary(65535));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varbinary(65534));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varbinary(65533));
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
mysql> create table t (c varbinary(65532));
Query OK, 0 rows affected (0.00 sec)
How to repeat:
See above.