DBAtlas · Database operations atlas

1118: ER_TOO_BIG_ROWSIZE: Row size too large

MySQL

What does it mean?

The row size of the table you are defining exceeds the maximum row size allowed by the storage engine. The maximum row size for non-BLOB/TEXT columns is 65535 bytes; InnoDB has additional limits that depend on the page size.

Why does it happen?

Defining many wide columns (especially long VARCHAR/CHAR); each character taking up to 4 bytes in multibyte character sets such as utf8mb4; or large columns stored inline in InnoDB's COMPACT/REDUNDANT row format.

How to fix it

Convert some large columns to TEXT/BLOB (these can be stored off-page); shrink unnecessary or very wide columns, or split the table in two. In InnoDB, using ROW_FORMAT=DYNAMIC or COMPRESSED helps by moving large columns off-page: ALTER TABLE my_table ROW_FORMAT=DYNAMIC; Also take innodb_page_size into account.

Open in DBAtlas →

More from this engine