Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
2  
Don't get distracted by the fact that you're using TEXT columns and the error message mentions TEXT columns... To identify this problem, you need to look at all of the other columns, the ones that aren't TEXT, which aren't currently shown in the output above. It's not likely these text columns that are causing the problem -- even if updating one of them triggers the error -- it's something in one of the other columns that's pushing the row size over the ~8000 byte limit for InnoDB. Post all of the columns, please. –  Michael - sqlbot May 4 '13 at 14:37
    
Those are all of the columns, and if any other columns were added they would be text as well. –  roach May 6 '13 at 13:04
    
Ah, sorry, since there are some skipped numbers, I assumed you had omitted some columns. What is the major/minor/release version of your server? (e.g., 5.1.67) –  Michael - sqlbot May 6 '13 at 13:17
    
Thats the version I think. –  roach May 9 '13 at 16:08

1 Answer 1

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 !!!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.