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

InnoDB unnecessarily extends data files

    XMLWordPrintable

    Details

      Description

      There are several bugs in the way how the InnoDB temporary tablespace is handled at InnoDB startup.

      The theoretical minimum size of the InnoDB temporary tablespace should be one allocation extent (1M for innodb_page_size=16k or less, 2M for innodb_page_size=32k, 4M for innodb_page_size=64k). For simplicity, it should be possible to set the minimum size as 4M.

      MDEV-12289 creates 128 rollback segments for the temporary tablespace. This might be an overkill, and perhaps we should create only 32 of them, like MySQL 5.7 does.

      In SysTablespace::open_or_create(), even if the specification lacks :autoextend for the last file, max_size=ULINT_MAX will be incorrectly assigned. This bug was introduced in MySQL 5.7 by WL#7943 https://github.com/mysql/mysql-server/commit/38e3aa74d8d2bf882863d9586ad8c9e9ed2c4f00, most of which was reverted from MariaDB 10.2 in MDEV-11426.

      MDEV-11585 accidentally inverted a condition in fsp_fill_free_list() that decides if the innodb_temporary tablespace should be extended.

      The biggest problem is that trx_rseg_header_create() is trying to extend the temporary tablespace already for creating the very first rollback segment. This happens for a 12MiB temporary tablespace when using 64KiB page size. The following test will crash:

      ./mtr --mysqld=--innodb-buffer-pool-size=24m --mysqld=--innodb-page-size=64k --mem innodb.temporary_table
      

      This must be fixed, so that the test can be run with all innodb_page_size combinations.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thiru Thirunarayanan Balathandayuthapani
                Reporter:
                marko Marko Mäkelä
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: