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

Stop performing unnecessary maximum row size check for DML

Details

    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

          Activity

            kevg Eugene Kosov (Inactive) created issue -
            kevg Eugene Kosov (Inactive) made changes -
            Field Original Value New Value
            kevg Eugene Kosov (Inactive) made changes -
            kevg Eugene Kosov (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Eugene Kosov [ kevg ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            kevg Eugene Kosov (Inactive) made changes -
            Description Warnings/errors should be issued on {{CREATE TABLE}} or {{ALTER TABLE}}. Warnings/errors should be issued on {{CREATE TABLE}} or {{ALTER TABLE}}.
            This check is performed based on index definition. InnoDB wants to ensure that it will be possible to insert every possible row for a given index definition.
            Another check is performed for every actual tuple. And this is a different one which shouldn't be touched in for this MDEV.

            Please re-submit the patch after fixing the compilation issues

            thiru Thirunarayanan Balathandayuthapani added a comment - Please re-submit the patch after fixing the compilation issues
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Eugene Kosov [ kevg ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            Description Warnings/errors should be issued on {{CREATE TABLE}} or {{ALTER TABLE}}.
            This check is performed based on index definition. InnoDB wants to ensure that it will be possible to insert every possible row for a given index definition.
            Another check is performed for every actual tuple. And this is a different one which shouldn't be touched in for this MDEV.
            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:

            {noformat}
            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.
            {noformat}

            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.

            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.
            GeoffMontee Geoff Montee (Inactive) made changes -
            Summary Stop issuing 'row size' error on DML Stop performing unnecessary maximum row size check for DML
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            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:

            {noformat}
            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.
            {noformat}

            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.

            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.
            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:

            {noformat}
            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.
            {noformat}

            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.
            kevg Eugene Kosov (Inactive) made changes -
            Assignee Eugene Kosov [ kevg ] Thirunarayanan Balathandayuthapani [ thiru ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            marko Marko Mäkelä added a comment - I posted some comments .
            marko Marko Mäkelä made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Eugene Kosov [ kevg ]
            kevg Eugene Kosov (Inactive) made changes -
            Fix Version/s 10.2.30 [ 24015 ]
            Fix Version/s 10.3.21 [ 24014 ]
            Fix Version/s 10.4.11 [ 24013 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 100799 ] MariaDB v4 [ 156930 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 147879 113644 118409 185863 160501 150204 114072 195104 198426 164062 166795 159353

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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