Bug #71461 Restart after apply-log yields lsn number mismatch in error log
Submitted: 23 Jan 2014 18:59 Modified: 23 Jan 2014 19:10
Reporter: Lee Stigile Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S4 (Feature request)
Version:3.9.0 OS:Linux (OL5)
Assigned to: CPU Architecture:Any

[23 Jan 2014 18:59] Lee Stigile
Description:
After restoring MEB backup, which was made with backup-and-apply-log, the error log shows the following on the subsequent server start: 
2014-01-13 16:25:33 16211 [Note] InnoDB: The log sequence numbers 
403922286 and 403922286 in ibdata files do not match the log sequence number 404982284 in the ib_logfiles!

If the apply-log was properly applied to the ibdata file and new logs were created, the numbers should match.  This message in the error log would lead one to assume that the log was not applied.

How to repeat:
Use MEB 3.9 to backup a database with "backup-and-apply-log"  

example:
D:\MySQL\MySQL Enterprise Backup 3.9.0\backupdir\datadir>mysqlbackup --port=3306 --protocol=tcp --user=root --backup-dir=./backupdir backup-and-apply-log

Use restore to restore the datafiles and start the database.  On startup, the eror log with include "ibdata files do not match the log sequence number.."

This is also seen in the internal documentation files: http://dev.mysql.com/doc/mysql-enterprise-backup/3.5/en/mysqlbackup.mysqld.html

This an be re-created with any innodb database.  I used the MEM 3.0 tables.  I ran a backup, deleted the datadir, restored, and then started the database.

Suggested fix:
After running apply-log, update the LSN in the ibdata file to match the new ib_logfiles.
[23 Jan 2014 19:10] Sveta Smirnova
Thank you for the reasonable feature request.