Bug #42812 ibbackup has problems recording binary log file and position
Submitted: 13 Feb 2009 1:11 Modified: 16 Feb 2009 23:02
Reporter: Sheeri Cabral (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.1.30 OS:Any
Assigned to: Pekka Lampio
Tags: deprecated, innodb hot backup, qc, type

[13 Feb 2009 1:11] Sheeri Cabral
Description:
the first part of the output, showing version, etc:

InnoDB Backup Utility v1.4.0; Copyright 2003-2007 Innobase Oy

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackup
           prints "innobackup completed OK!".

innobackup: Using mysql  Ver 14.12 Distrib 5.0.67, for redhat-linux-gnu (i686) using readline 5.1
innobackup: Using mysql server version 5.0.67-community-log
innobackup: Using InnoDB Hot Backup version 3.0.0

The important part of the output:
innobackup: MySQL binlog position: filename 'Warning', position (Code 1287): 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
090210 03:55:04  innobackup: innobackup completed OK!

And after the backup is done:

[mysql@db3:~] more ibbackup_binlog_info 
Warning (Code 1287): 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead

Yikes!  But what binary log position are we at?!?!

How to repeat:
This would have been marked critical, only I found the binary log position in a file...

[mysql@db3:~] more mysql-stdout 
innobackup hello 3
innobackup hello 3
innobackup hello 4
innobackup hello 4
innobackup hello 5
innobackup hello 5
Note (Code 1051): Unknown table 'ibbackup_binlog_marker'
innobackup hello 6
innobackup hello 6
Warning (Code 1287): 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
innobackup hello 7
innobackup hello 7
innobackup hello 8
innobackup hello 8
innobackup hello 9
innobackup hello 9
innobackup hello 10
innobackup hello 10
innobackup hello 11
innobackup hello 11
File    Position        Binlog_Do_DB    Binlog_Ignore_DB
db2-binlog.001980       495985099               
innobackup hello 12
innobackup hello 12
innobackup hello 13
innobackup hello 13
innobackup hello 14
innobackup hello 14

Suggested fix:
use ENGINE instead of TYPE for the definition of ibbackup_binlog_marker and any other tables ibbackup creates.
[13 Feb 2009 8:05] Vasil Dimov
Hi,

Can you try to replace TYPE= with ENGINE= in the innobackup script and see if the problem is gone?

Assuming you are using the latest innobackup-1.5.0 from http://www.innodb.com/download/innobackup-1.5.0 you should only change TYPE= with ENGINE= on line 959 in that script:

    mysql_send "CREATE TABLE ibbackup_binlog_marker(a INT) TYPE=INNODB;";

Thank you!
[13 Feb 2009 10:50] Heikki Tuuri
This is a bug in the innobackup Perl script. It should use 'ENGINE='.

I believe the ibbackup binary program still prints the right position.

Assigning this to Pekka.
[13 Feb 2009 18:31] Singer Wang
(Co-Worker of Sheeri Cabral here)..

I'm making the modification now to the latest innobackup.pl and tomorrow I will post the results..
[16 Feb 2009 23:00] Ken Jacobs
This was, of course, a simple change to the innobackup Perl script.  You can find the corrected file on the InnoDB website: http://www.innodb.com/downloads/.