Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
When a DDL statement, such as CREATE TABLE or ALTER TABLE, affects an InnoDB table, InnoDB calculates the maximum row size of the new or altered table. If InnoDB detects that the maximum row size is too big to fit on an index's leaf page, then it prints the following message in the error log:
2019-07-28 0:57:51 140189814937344 [Warning] InnoDB: Cannot add field `c08` in table `test`.`t1` because after adding it, the row size is 2484 which is greater than maximum allowed size (1982) for a record on index leaf page.
|
If innodb_strict_mode is enabled, then the message will be an error. If innodb_strict_mode is disabled, then the message will be a warning.
This check is here: https://github.com/MariaDB/server/blob/mariadb-10.2.27/storage/innobase/dict/dict0dict.cc#L2138
InnoDB performs this check, because it wants to ensure that it will be possible to insert every possible row for a given index definition.
The problem is that this check is currently being performed when executing DML, and not just when executing DDL. This means that users can see confusing warning or error messages in the error log. We should fix it, so that InnoDB only performs this specific check when executing DDL.
When executing DML, InnoDB will still have to check every actual tuple to determine whether it exceeds InnoDB's maximum row size. That check is still appropriate, and it shouldn't be touched in this MDEV.
Attachments
Issue Links
- causes
-
MDEV-21172 Memory leak after failed ADD PRIMARY KEY
- Closed
-
MDEV-26371 Assertion `info.max_leaf_size != 0' failed in create_table_info_t::row_size_is_acceptable
- Closed
- is part of
-
MDEV-20194 Warnings inconsistently issued upon CHECK on table from older versions
- Closed
- relates to
-
MDEV-16969 Fix error message as promised in upstream Bug #69336
- Open
-
MDEV-19292 "Row size too large" error when creating table with lots columns when row format is DYNAMIC or COMPRESSED
- Closed
-
MDEV-20400 Implement a way to query an InnoDB table's max row size
- Open
-
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-23521 Implement an InnoDB row format that can use overflow pages for smaller columns
- Open
-
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