Bug #78363 InnoDB redo log does not indicate when files are created
Submitted: 8 Sep 2015 9:17 Modified: 10 Sep 2015 17:13
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[8 Sep 2015 9:17] Marko Mäkelä
Description:
As part of WL#7142 Simplify tablespace discovery during crash recovery,
InnoDB removed code to deal with the MLOG_FILE_CREATE2 redo log record.

The thinking was that external backup tools could parse MLOG_FILE_NAME
records to discover created files. However, MLOG_FILE_NAME usually gets
emitted for something else than file creation, and the MLOG_FILE_CREATE2
record included some flags that are not present in the MLOG_FILE_NAME
records.

So, it seems that we must bring back the record, for the benefit of
external backup tools that parse the redo log.

How to repeat:
Read the code, and try to adapt a backup utility to the WL#7142 changes.

Suggested fix:
In fil_ibd_create(), emit MLOG_FILE_CREATE2 records as well as MLOG_FILE_NAME.
When parsing the redo log, make InnoDB ignore the MLOG_FILE_CREATE2 records.
[10 Sep 2015 17:13] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.9, 5.8.0 release, and here's the changelog entry:

Tablespace discovery modifications in MySQL 5.7.5 included the removal of
code related to MLOG_FILE_CREATE2 redo log records. As a result, the redo
log did not contain sufficient information about file creation.