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
TEXT
columns and the error message mentionsTEXT
columns... To identify this problem, you need to look at all of the other columns, the ones that aren'tTEXT
, 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.