[MDEV-16969] Fix error message as promised in upstream Bug #69336 Created: 2018-08-14  Updated: 2022-02-03

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - InnoDB
Fix Version/s: None

Type: Task Priority: Major
Reporter: Valerii Kravchuk Assignee: Vladislav Lesin
Resolution: Unresolved Votes: 0
Labels: error

Issue Links:
Relates
relates to MDEV-20194 Warnings inconsistently issued upon C... Closed
relates to MDEV-20268 create table fails with row size too ... Closed
relates to MDEV-20346 Cannot create a certain table: Row si... Closed
relates to MDEV-20400 Implement a way to query an InnoDB ta... Confirmed
relates to MDEV-20832 Don't print "row size too large" warn... Closed
relates to MDEV-10364 Row size too large (> 8126) Closed
relates to MDEV-19292 "Row size too large" error when creat... Closed
relates to MDEV-20256 "Row size too large" on latest releas... Closed
relates to MDEV-20786 MariaDB server writes warnings into e... Closed
relates to MDEV-20949 Stop performing unnecessary maximum r... Closed
relates to MDEV-22585 Incorrect note being written to the e... Open
relates to MDEV-23521 Implement an InnoDB row format that c... Open

 Description   

In MariaDB 10.2+ we still get weird and useless error messages like this:

...
    -> , `h_29` tinyint unsigned null
    -> , `h_3` tinyint unsigned null
    -> , `h_30` tinyint unsigned null
    -> , `h_31` tinyint unsigned null
    -> , `h_4` tinyint unsigned null
    -> , `h_5` tinyint unsigned null
    -> , `h_6` tinyint unsigned null
    -> , `h_7` tinyint unsigned null
    -> , `h_8` tinyint unsigned null
    -> , `h_9` tinyint unsigned null
    -> , primary key (element_id, daytime)) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=dynamic;
ERROR 1118 (42000): 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.
MariaDB [test]> select version();
+----------------+
| version()      |
+----------------+
| 10.3.9-MariaDB |
+----------------+
1 row in set (0.000 sec)

Test is taken from upstream https://bugs.mysql.com/bug.php?id=77398 (https://bugs.mysql.com/file.php?id=26301&bug_id=77398).

That " BLOB prefix of 0 bytes" statement is just wrong, and message otherwise does not help to find what column starts to cause the problem.

There is a statement in https://bugs.mysql.com/bug.php?id=69336 that error message is fixed and made useful since 5.7.5. This does NOT seem to be the case neither in 5.7.22, nor in 8.0.12:

...
    -> , `h_6` tinyint unsigned null
    -> , `h_7` tinyint unsigned null
    -> , `h_8` tinyint unsigned null
    -> , `h_9` tinyint unsigned null
, primary key (element_id, daytime)) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=    -> , primary key (element_id, daytime)) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=dynamic;
ERROR 1118 (42000): 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.
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.12    |
+-----------+
1 row in set (0,00 sec)

We need this fixed in 10.2+, to help users change their schema to meet expected limitations .

See MDEV-13111 also on impact of innodb_strict_mode on this.



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-08-09 ]

What do you think it should say instead? Something like this?:

ERROR 1118 (42000): Row size too large (> 8126). With the Dynamic row format, it may help to change some column definitions, so that they can be stored on overflow pages, since only a 20 byte pointer for those columns would be stored inline. For example, you could change some columns to the TEXT or BLOB data types, or you could make sure that any VARCHAR or VARBINARY columns are 256 bytes or more.

Comment by Geoff Montee (Inactive) [ 2019-08-20 ]

I think this related warning also needs to be improved:

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.

This warning would seem to imply that the c08 column is being added by some DDL statement, but this warning is also logged in the context of things like CHECK TABLE. In contexts like that, this warning doesn't make sense, so I think this warning should be improved. See also MDEV-20194.

Generated at Thu Feb 08 08:32:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.