Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20949

Stop performing unnecessary maximum row size check for DML




      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.


        Issue Links



              kevg Eugene Kosov (Inactive)
              kevg Eugene Kosov (Inactive)
              1 Vote for this issue
              8 Start watching this issue



                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.