Bug #57387 ibdata1 cannot be smaller than 18M in 5.5.6-rc, asserts without autoextend
Submitted: 11 Oct 2010 21:42 Modified: 13 Feb 2012 1:52
Reporter: Chris Calender Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.5.6 OS:Any
Assigned to: Sunny Bains CPU Architecture:Any
Tags: 18M, IBData1, innodb_data_file_path

[11 Oct 2010 21:42] Chris Calender
Description:
The actual size of innodb_data_file_path (e.g., ibdata1) is written as an 18M file even if you specify a smaller value for innodb_data_file_path.

This occurs for the default size of 10M, or any other size < 18M.

How to repeat:
Start InnoDB 5.5.6 with the following, default option (or even omit the option altogether):

innodb_data_file_path=ibdata1:10M:autoextend

Start MySQL.

Observe Error Log and SHOW GLOBAL STATUS which both show 10M for innodb_data_file_path:

InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
101011 17:29:05  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
101011 17:29:06  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait...
101011 17:29:06  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
...

mysql> show global variables like '%innodb%';
+---------------------------------+------------------------+
| Variable_name                   | Value                  |
+---------------------------------+------------------------+
...
| innodb_data_file_path           | ibdata1:10M:autoextend |
...

However, now look at the size of the file on disk:

On my machine, it shows:

ibdata1 18,432 KB

The same thing occurs if you try values < 18M.

Suggested fix:
N/A
[12 Oct 2010 15:50] Mikhail Izioumtchenko
also happens on Linux. Does not happen with 5.1 plugin.
The natural culprit is the 127 more rollback segments we create.
Here's what happens if in 5.5 I specify --innodb-data-file-path=ibdata1:10M
without the autoextend:

101012  8:44:19  InnoDB: Assertion failure in thread 46936747226352 in file .../storage/innobase/trx/trx0rseg.c line 319
InnoDB: Failing assertion: page_no != FIL_NULL

will post more details and some suggestions separately