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

Crash in online table rebuild with concurrent DELETE of many BLOBs

Details

    Description

      In table-rebuilding online ALTER TABLE (WL#6255 implemented by me in MySQL 5.6), unless table is in ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT both before and after the operation, a prefix of externally stored columns was being written to the online_log. A DELETE operation that ran concurrently with the table-rebuilding operation (ALTER TABLE, OPTIMIZE TABLE or CREATE UNIQUE INDEX) could write too much data, causing a buffer overflow in log->tail.buf.

      After I fixed Bug#16544143 in MySQL 5.6.12, there is no need to store any prefixes of externally stored columns into the log.

      This bug has been fixed in MySQL Bug #25928471: ONLINE ALTER AND CONCURRENT DELETE ON TABLE WITH MANY TEXT COLUMNS CAUSES CRASH. The fix is available in MySQL 8.0.11. It has been applied to the 8.0 branch only, not to 5.6 or 5.7.

      Attachments

        Activity

          marko Marko Mäkelä created issue -
          marko Marko Mäkelä made changes -
          Field Original Value New Value
          Description In table-rebuilding online ALTER (WL#6255 implemented by me in MySQL 5.6), unless the source table is in {{ROW_FORMAT=REDUNDANT}}, a prefix of externally stored columns was being written to the online_log. A {{DELETE}} operation that ran concurrently with the table-rebuilding operation ({{ALTER TABLE}}, {{OPTIMIZE TABLE}} or {{CREATE UNIQUE INDEX}}) could write too much data, causing a buffer overflow in {{log->tail.buf}}.

          After I [fixed Bug#16544143 in MySQL 5.6.12|https://github.com/mysql/mysql-server/commit/1a430e72c82d4ddfbe79777bab5bcdc9956b4cf2], there is no need to store any prefixes of externally stored columns into the log.

          This bug has been fixed in [MySQL Bug #25928471: ONLINE ALTER AND CONCURRENT DELETE ON TABLE WITH MANY TEXT COLUMNS CAUSES CRASH|https://github.com/mysql/mysql-server/commit/4abc331cd6dce9d18bb33060e450f0bc2e58920e]. The fix is available in MySQL 8.0.11. It has been applied to the 8.0 branch only, not to 5.6 or 5.7.
          In table-rebuilding online {{ALTER TABLE}} (WL#6255 implemented by me in MySQL 5.6), unless table is in {{ROW_FORMAT=REDUNDANT}} or {{ROW_FORMAT=COMPACT}} both before and after the operation, a prefix of externally stored columns was being written to the {{online_log}}. A {{DELETE}} operation that ran concurrently with the table-rebuilding operation ({{ALTER TABLE}}, {{OPTIMIZE TABLE}} or {{CREATE UNIQUE INDEX}}) could write too much data, causing a buffer overflow in {{log->tail.buf}}.

          After I [fixed Bug#16544143 in MySQL 5.6.12|https://github.com/mysql/mysql-server/commit/1a430e72c82d4ddfbe79777bab5bcdc9956b4cf2], there is no need to store any prefixes of externally stored columns into the log.

          This bug has been fixed in [MySQL Bug #25928471: ONLINE ALTER AND CONCURRENT DELETE ON TABLE WITH MANY TEXT COLUMNS CAUSES CRASH|https://github.com/mysql/mysql-server/commit/4abc331cd6dce9d18bb33060e450f0bc2e58920e]. The fix is available in MySQL 8.0.11. It has been applied to the 8.0 branch only, not to 5.6 or 5.7.
          marko Marko Mäkelä made changes -
          Component/s Storage Engine - XtraDB [ 10135 ]
          marko Marko Mäkelä made changes -
          issue.field.resolutiondate 2018-05-03 08:50:10.0 2018-05-03 08:50:10.927
          marko Marko Mäkelä made changes -
          Fix Version/s 10.0.35 [ 22912 ]
          Fix Version/s 10.1.33 [ 22909 ]
          Fix Version/s 10.2.15 [ 23006 ]
          Fix Version/s 10.3.7 [ 23005 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.0 [ 16000 ]
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          marko Marko Mäkelä made changes -
          Fix Version/s 10.0.36 [ 22916 ]
          Fix Version/s 10.0.35 [ 22912 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 86905 ] MariaDB v4 [ 154298 ]

          People

            marko Marko Mäkelä
            marko Marko Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.