saving base64 data - row size too large issue

Imran Azad picture Imran Azad · Nov 22, 2011 · Viewed 7.4k times · Source

I have 22 database fields of type longtext. If I try saving 12 of the fields with the following data I get the following error:

#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 

It saves fine if I only save 11 fields. Here's the data:

BYOkQoFxB5+S8VH8svilSI/hQCUDlh1wGhyHacxjNpShUKlGJJ5HZ1DQTKGexBaP65zeJksfOnvBloCSbVmNgYxQhaQHn7sJlKjwtC00X/me2K8Vs4I9cL9SZx58Q2iXXQBbJYaAhn0LaEJMUN0P7VWd0/MiKgXsJt0UiXBf7Rlo6JIooBlaf59zA+II1o3MJKmzyH4q7C1qm2bC0LIT79ZCWDDSdqQaKZ1k1gPMu+yDYQPjrNiQUW29K/AdJ/XpPHT50jaJUjoMv9fL2TK0bUMO0VGe+0Cf4j0BE3QHlFnHqdgnLCTWk8NVo5U4Y5XTObsZtWwd1wHFZNIatuvg0cQk6WHojx3H9HavxKs9JJWYp8eCywyLhjmF39jMoZRT4n8fSTGDGif2q3VJE7DQrmQTjyQkSl9yUWvcTTUHAyNRYKnthVbgbzOOhEvhOZPuD4h+dcGyiW/xk+Lvu2XqkMDBIBuLcKymrdhefi4DElpuwyKFH7DNt6Y3fllPN/0XuSF0YXPqnBDLUcZsMqdzWPZX4RoVza/0Do+mHejYUSYnhsFWtPUHlTnU6fojBqw0icoKqhwjcIVpZmATwgYwXclsSwqEBWm9q9DMNzXG73bq6bs29BKq3E9S/fxo9Bz3mThNaj33fhyD4mj8indAIQeLVWvW3dq4T8+0lao6Ll0=

How can I fix the issue? How can I increase the bytes of the row size so it is more than 8126?

Answer

Luis G. Costantini R. picture Luis G. Costantini R. · Nov 22, 2011

The problem is the row size limit for InnoDB tables, in this links you can find some approaches to solve this: