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
- blocks
-
MDEV-26782 InnoDB temporary tablespace: reclaiming of free space does not work
- Closed
- relates to
-
MDEV-21952 ibdata1 file size growing in MariaDB
- Closed
-
MDEV-28038 Why is there a big gap in the actual Table space? (calculated vs information_schema vs file size)
- Open
-
MDEV-28699 Shrink temporary tablespaces without restart
- Closed
-
MDEV-11585 Hard-code the shared InnoDB temporary tablespace ID
- Closed
-
MDEV-12042 Re-bootstrap the server if InnoDB options are incompatible (Make InnoDB tests run with all --mysqld=--innodb-page-size)
- Closed
-
MDEV-12289 Keep 128 persistent rollback segments for compatibility and performance
- Closed
-
MDEV-12600 crash during install_db with innodb_page_size=32K and ibdata1=3M;
- Closed
-
MDEV-14887 On a 32-bit system, MariaDB 10.2 mishandles data file sizes exceeding 4GiB
- Closed
-
MDEV-26525 Replication stops because too big innodb-temp-data-file
- Closed