[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. Created: 2020-05-15  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Data Definition - Create Table, Storage Engine - InnoDB
Affects Version/s: 10.2.31, 10.3.22, 10.4.12, 10.5.2
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Minor
Reporter: Juan Assignee: Thirunarayanan Balathandayuthapani
Resolution: Unresolved Votes: 0
Labels: logging
Environment:

CentOS 7


Issue Links:
Relates
relates to MDEV-16969 Fix error message as promised in upst... Open
relates to MDEV-19292 "Row size too large" error when creat... Closed
relates to MDEV-20194 Warnings inconsistently issued upon C... Closed
relates to MDEV-20448 Add link to release notes about "Row ... Closed
relates to MDEV-20786 MariaDB server writes warnings into e... Closed
relates to MDEV-20832 Don't print "row size too large" warn... Closed
relates to MDEV-20949 Stop performing unnecessary maximum r... Closed
relates to MDEV-21261 When performing instant add column, I... Confirmed
relates to MDEV-21429 TRUNCATE and OPTIMIZE are being refus... Closed
relates to MDEV-23521 Implement an InnoDB row format that c... Open

 Description   

When innodb_strict_mode is on, table creation and every alter table that would result in a too-large row size fails, issuing an error 1118:

ERROR 1118 (42000) at line 1: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

and logs a different but technically correct message to the error log:

2020-05-15 11:45:03 140346379175680 [ERROR] InnoDB: Cannot add field `c181` in table `test`.`toobig12` because after adding it, the row size is 8143 which is greater than maximum allowed size (8126 bytes) for a record on index leaf page.

However, when innodb_strict_mode=0 the error message becomes a warning message:

Warning	139	Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

but the same message written to the error log as an error when innodb_strict_mode was set to 1 gets written to the error log as a warning:

2020-05-15 11:45:03 140446790313728 [Warning] InnoDB: Cannot add field `c181` in table `test`.`toobig12` because after adding it, the row size is 8143 which is greater than maximum allowed size (8126 bytes) for a record on index leaf page.

The same problem happens with TRUNCATE TABLE and OPTIMIZE TABLE operations. However, these operations succeed and write the incorrect message to the log regardless of the value of innodb_strict_mode.

which is incorrect. The table gets successfully created with all fields including c181 and c182-c200.


Generated at Thu Feb 08 09:15:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.