Bug #66766 Can't make incremental backup with only-innodb-with-frm
Submitted: 11 Sep 2012 12:19 Modified: 28 Feb 2013 16:13
Reporter: T. M. Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S2 (Serious)
Version:3.8.1 OS:Any (MS Windows, Linux)
Assigned to: CPU Architecture:Any

[11 Sep 2012 12:19] T. M.
Description:
Incremental backup fail with the option "only-innodb-with-frm".

Error message :

 mysqlbackup: ERROR: Unable to read engine name from the frm file G:\DATA\backimpact\_logdelid.frm

note : "_logdelid" is a View.

here is the log :

MySQL Enterprise Backup version 3.8.0 [Fri 07/27/2012 ] 
Copyright (c) 2003, 2012, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 C:\Program Files\MySQL\MySQL Enterprise Backup 3.8\mysqlbackup.exe 
        --defaults-file=C:\Program Files\Mysql Server 5.1\my.ini --user=root 
        --password=xxxx --host=localhost --port=3306 --sleep=0 backup --incremental 
        --incremental-backup-dir=E:\SauvegardeMysql\INC1\ 
        --incremental-base=dir:E:\SauvegardeMysql\FULL\ --only-innodb-with-frm 

 mysqlbackup: INFO: MySQL server version is '5.1.36-enterprise-gpl-advanced'.
 mysqlbackup: INFO: Got some server configuration information from running server.

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

--------------------------------------------------------------------
                       Server Repository Options:
--------------------------------------------------------------------
  datadir = G:\DATA\
  innodb_data_home_dir = 
  innodb_data_file_path = ibdata1:10M:autoextend
  innodb_log_group_home_dir = G:\DATA\
  innodb_log_files_in_group = 2
  innodb_log_file_size = 87031808

--------------------------------------------------------------------
                       Backup Config Options:
--------------------------------------------------------------------
  datadir = E:\SauvegardeMysql\INC1\datadir
  innodb_data_home_dir = E:\SauvegardeMysql\INC1\datadir
  innodb_data_file_path = ibdata1:10M:autoextend
  innodb_log_group_home_dir = E:\SauvegardeMysql\INC1\datadir
  innodb_log_files_in_group = 2
  innodb_log_file_size = 87031808

 mysqlbackup: INFO: Unique generated backup id for this is 13473324020172911

120911 05:00:03 mysqlbackup: INFO: Using start_lsn=19558748483596, calculated from backup_history table of MySQL server and backup_variables.txt file of incremental-base backup.
 mysqlbackup: INFO: Creating 12 buffers each of size 16809984.
120911 05:00:05 mysqlbackup: INFO: Incremental Backup operation starts with following threads
		3 read-threads    3 process-threads    3 write-threads
120911 05:00:05 mysqlbackup: INFO: System tablespace file format is Antelope.
120911 05:00:05 mysqlbackup: INFO: Starting to copy of all innodb files...
120911 05:00:05 mysqlbackup: INFO: Copying G:\DATA\ibdata1 (Antelope file format).
120911 05:00:05 mysqlbackup: INFO: Found checkpoint at lsn 19569540464169.
120911 05:00:05 mysqlbackup: INFO: Starting log scan from lsn 19569540464128.
120911 05:00:05 mysqlbackup: INFO: Copying log...
120911 05:00:05 mysqlbackup: INFO: Log copied, lsn 19569540464169.
 mysqlbackup: Progress in MB: 200 ... 186800 
120911 05:36:38 mysqlbackup: INFO: Completing the copy of innodb files.
120911 05:36:40 mysqlbackup: INFO: Opening backup source directory 'G:\DATA\'
120911 05:36:40 mysqlbackup: INFO: Starting to backup .frm files in the subdirectories of G:\DATA\
 mysqlbackup: ERROR: Unable to read engine name from the frm file G:\DATA\backimpact\_logdelid.frm

How to repeat:
I have not been able to reproduce the error on another server.

I tried to create an Innodb Table with a view pointing on it. Then i made a full backup and then an incremental backup with only-innodb-with-frm but it works...

I also tried to drop the view "_logdelid" and then re-create the view, but same problem happens.

Mysql version : 5.1.36
MEB : 3.8

Running on Windows Server 2008 x64.
[11 Sep 2012 18:46] Sveta Smirnova
Thank you for the report.

Verified as described:

mysql> create table t1(f1 int) engine=innodb;
Query OK, 0 rows affected (0.18 sec)

mysql> insert into t1 values(1);
Query OK, 1 row affected (0.06 sec)

mysql> create view v1 select * from t1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select * from t1' at line 1
mysql> create view v1 as select * from t1;
Query OK, 0 rows affected (0.05 sec)

[sveta@delly meb-trunk]$  ./bin/mysqlbackup --user=root --host=127.0.0.1 --port=13000 --backup-dir=/home/sveta/src/BACKUPDIR/bug66766 --only-innodb-with-frm backup
MySQL Enterprise Backup version 3.8.0 [2012/08/07] 
Copyright (c) 2003, 2012, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 ./bin/mysqlbackup --user=root --host=127.0.0.1 --port=13000 
        --backup-dir=/home/sveta/src/BACKUPDIR/bug66766 --only-innodb-with-frm 
        backup 
...
120911 21:42:58 mysqlbackup: INFO: Completing the copy of innodb files.
120911 21:42:58 mysqlbackup: INFO: Log copied, lsn 1598186.
120911 21:43:00 mysqlbackup: INFO: Opening backup source directory '/home/sveta/src/mysql-5.5/mysql-test/var/mysqld.1/data/'
120911 21:43:00 mysqlbackup: INFO: Starting to backup .frm files in the subdirectories of /home/sveta/src/mysql-5.5/mysql-test/var/mysqld.1/data/
120911 21:43:00 mysqlbackup: INFO: Copying the database directory 'test'
 mysqlbackup: ERROR: Unable to read engine name from the frm file /home/sveta/src/mysql-5.5/mysql-test/var/mysqld.1/data/test/v1.frm

No workaround: databases filters does not work.
[7 Feb 2013 12:20] Jothir Ganesan
Fixed in 3.8.1
[28 Feb 2013 16:13] Sanjay Manwani
The fix ensures that Backup operation does not fail when
only-innodb-with-frm option is provided and database has
views.