Bug #9077 VARCHAR col with length above 65532 is not accepted by MEMORY engine
Submitted: 9 Mar 2005 16:00 Modified: 16 Mar 2005 19:15
Reporter: Disha Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3-alpha-nt OS:Windows (Windows Server 2003)
Assigned to: Jim Winstead CPU Architecture:Any

[9 Mar 2005 16:00] Disha
Description:
When we try to create a table having a field as VARCHAR with length more than 65532, an unexpected error is displayed if we use the MEMORY engine.

How to repeat:
Repro Steps: 
 1. Connect to MySQL server with valid user name and password.

 2. Select the TEST database with the USE command as follows:
 USE TEST

 3. Drop any table having name T1 if exists:
 DROP TABLE if exists T1

 4. Create a table with name T1 having a VARCHAR field of length more than 65532 having the MEMORY engine as follows:
 CREATE TABLE T1(F1 VARCHAR(65534)) ENGINE=MEMORY//

 Expected Results: The table should be created with VARCHAR column having length 65534. 

 Actual Results:  Table creation fails with the following error:
 "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".

 Additional Info: We observed this behavior for length values form 65533 and above till 65535.
[16 Mar 2005 19:15] Jim Winstead
This behavior (which is not limited to MEMORY tables) is documented at http://dev.mysql.com/doc/mysql/en/string-type-overview.html