Mysql – Error “#1118 – row size too large” on the first row of the table only

errorsMySQLmysql-5.5update

I ran into a problem using a mySQL database. I have some columns as type text but when I try to enter data into the first row I get the error code "#1118 – Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs" for anything with more than 15 characters. This only occurs for the first row, all the other rows in the column and table work just fine. Help!

Field Type    Collation              Null   Default  Extra  
pid   int(11)                        No     None     AUTO_INCREMENT             
3     text    utf8_general_ci        Yes    NULL                                
6     text    utf8_general_ci        Yes    NULL                                
7     text    utf8_general_ci        Yes    NULL                                
8     text    utf8_general_ci        Yes    NULL                                
9     text    utf8_general_ci        Yes    NULL                                
10    text    utf8_general_ci        Yes    NULL                                
21    text    utf8_general_ci        Yes    NULL                                
22    text    utf8_general_ci        Yes    NULL                                
23    text    utf8_general_ci        Yes    NULL                                
24    text    utf8_general_ci        Yes    NULL                                
25    text    utf8_general_ci        Yes    NULL                                
26    text    utf8_general_ci        Yes    NULL                                
27    text    utf8_general_ci        Yes    NULL                                
28    text    utf8_general_ci        Yes    NULL                                
29    text    utf8_general_ci        Yes    NULL                                
30    text    utf8_general_ci        Yes    NULL                                
31    text    utf8_general_ci        Yes    NULL                                
32    text    utf8_general_ci        Yes    NULL                                
33    text    utf8_general_ci        Yes    NULL                                
34    text    utf8_general_ci        Yes    NULL                                
35    text    utf8_general_ci        Yes    NULL                                
36    text    utf8_general_ci        Yes    NULL                                
37    text    utf8_general_ci        Yes    NULL                                
38    text    utf8_general_ci        Yes    NULL                                
39    text    utf8_general_ci        Yes    NULL                                
40    text    utf8_general_ci        Yes    NULL                                
... 41-59 follow

Indexes:

Keyname Type    Unique  Packed  Field   Cardinality Collation   Null    
PRIMARY BTREE   Yes     No      pid     61          A       

Server Version: 5.5.9

Best Answer

As suggested from this bug report, you may need to look into the following:

File Format

Row Format

Suggestions

Workaround: use new InnoDB file format Barracuda and row_format=DYNAMIC

This was added to the change log in MySQL 5.5.29

Perhaps an upgrade to the latest MySQL 5.5. is in order

Give it a Try !!!