Details
-
New Feature
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
With the DYNAMIC row format, variable-length fields can only be stored on overflow pages if they are defined with a maximum size of 256 bytes or more., and fixed-length fields can only be stored on overflow pages if their maximum size is 768 bytes or more. From the documentation:
For BLOB and TEXT columns, only values longer than 40 bytes are considered for storage on overflow pages. For VARBINARY and VARCHAR columns, only values longer than 255 bytes are considered for storage on overflow pages. Bytes that are stored to track a value's length do not count towards these limits. These limits are only based on the length of the actual column's data.
These limits differ from the limits for the COMPACT row format, where the limit is 767 bytes for all types.
Fixed-length columns greater than 767 bytes are encoded as variable-length columns, so they can also be stored in overflow pages if the table's row size is greater than half of innodb_page_size. Even though a column using the CHAR data type can hold at most 255 characters, a CHAR column can still exceed 767 bytes in some cases. For example, a char(255) column can exceed 767 bytes if the character set is utf8mb4.
A lot of users run into "row size too large" errors due to this:
https://mariadb.com/kb/en/library/troubleshooting-row-size-too-large-errors-with-innodb/
A counter-intuitive solution to many of these issues is to actually increase the length of variable-length fields, so that they can be stored on overflow pages.
It might be a good idea to implement a row format that allows smaller pages to be stored on overflow pages, so that users don't have to use this workaround.
Attachments
Issue Links
- relates to
-
MDEV-10364 Row size too large (> 8126)
- Closed
-
MDEV-16969 Fix error message as promised in upstream Bug #69336
- Open
-
MDEV-20256 "Row size too large" on latest release (10.3.17)
- Closed
-
MDEV-20268 create table fails with row size too large in 10.3 but not 10.1
- Closed
-
MDEV-20346 Cannot create a certain table: Row size too large
- Closed
-
MDEV-20448 Add link to release notes about "Row size too large" errors
- Closed
-
MDEV-20786 MariaDB server writes warnings into errorlog although 'log_warnings=0'
- Closed
-
MDEV-20832 Don't print "row size too large" warnings in error log if innodb_strict_mode=OFF and log_warnings<=2
- Closed
-
MDEV-21261 When performing instant add column, InnoDB ignores innodb_strict_mode for "row size too large" check
- Confirmed
-
MDEV-19292 "Row size too large" error when creating table with lots columns when row format is DYNAMIC or COMPRESSED
- Closed
-
MDEV-20194 Warnings inconsistently issued upon CHECK on table from older versions
- Closed
-
MDEV-20400 Implement a way to query an InnoDB table's max row size
- Open
-
MDEV-20949 Stop performing unnecessary maximum row size check for DML
- Closed
-
MDEV-21429 TRUNCATE and OPTIMIZE are being refused due to "row size too large"
- Closed
-
MDEV-22585 Incorrect note being written to the error log when CREATE and ALTER fail due to Row Size Too Large and in all cases for TRUNCATE and OPTIMIZE TABLE.
- Open