Bug #56395 backup_type does not show "Partial backup" in history logs of MEB
Submitted: 31 Aug 2010 4:37 Modified: 31 Aug 2010 22:33
Reporter: Hema Sridharan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:MEB3.5 OS:Linux
Assigned to: Satya B CPU Architecture:Any

[31 Aug 2010 4:37] Hema Sridharan
Description:
Execute partial backup(table backup) using innobackup tool. This can be done using --include option.
Once backup is completed, check the backup_history logs for backup_type. The expected result is "Partial Backup" but the result obtained is "FULL Backup".
This needs to be fixed.

How to repeat:
Run innobackup from mysql-5.1-meb suite.

CREATE DATABASE dbb;
CREATE TABLE dbb.td1(id INT)ENGINE=INNODB;
INSERT INTO dbb.td1 VALUES (1),(2),(3),(4),(5);
CREATE TABLE dbb.td3(id INT, a CHAR(5))ENGINE=INNODB;
INSERT INTO dbb.td3 VALUES(1,'a'),(2,'b'),(3,'c'),(4,'e');
CREATE TABLE dbb.te1(id INT)ENGINE=INNODB;
INSERT INTO dbb.te1 VALUES(1),(2),(3),(4);

--echo #
--echo # Run innobackup for table backup only (Partial backup)
--echo ......
--exec $INNOBACKUP --include='dbb\.td.*' --no-timestamp $SERVER_CNF $BACKUP_TARGET_DIR --port=$MASTER_MYPORT --user=root > $BACKUP_LOG 2>&1

# Now check in history logs
SELECT backup_type FROM mysql.backup_history;
backup_type
FULL --->

The expected result should be "PARTIAL" backup. As per work log design, partial backups should be recognized backup_type in history logs.
[31 Aug 2010 8:41] Satya B
I have modified innobackup2.test:

=== modified file 'mysql-test/suite/meb/t/innobackup2.test'
--- mysql-test/suite/meb/t/innobackup2.test	2010-06-08 16:17:39 +0000
+++ mysql-test/suite/meb/t/innobackup2.test	2010-08-31 08:35:39 +0000
@@ -133,6 +133,8 @@
 --echo # Running innobackup ...
 --echo # ...
 --exec $INNOBACKUP --include='dbb\.td.*' --no-timestamp $SERVER_CNF $BACKUP_TARGET_DIR --port=$MASTER_MYPORT --user=root > $BACKUP_LOG 2>&1
+SELECT backup_type FROM mysql.backup_history;
+
 # If not success, mysqltest would exit after the --exec line.
 --echo # Innobackup is Success!

meb.innobackup2                          [ fail ]
        Test ended at 2010-08-31 14:07:19

CURRENT_TEST: meb.innobackup2
--- /home/satya/WORK/mysql-5.1-meb-wl-5319/mysql-test/suite/meb/r/innobackup2.result	2010-06-10 18:54:33.140568000 +0300
+++ /home/satya/WORK/mysql-5.1-meb-wl-5319/mysql-test/suite/meb/r/innobackup2.reject	2010-08-31 11:37:18.832749966 +0300
@@ -1574,6 +1574,9 @@
 # Start backup to backup only tables starting from 'td'
 # Running innobackup ...
 # ...
+SELECT backup_type FROM mysql.backup_history;
+backup_type
+PARTIAL
 # Innobackup is Success!
 DROP DATABASE dbb;
 #

I am wondering if you are using the latest patch submitted on meb-3.5.next branch.
[31 Aug 2010 9:02] Satya B
I have execute the testcase you've mentioned.

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
CREATE DATABASE dbb;
CREATE TABLE dbb.td1(id INT)ENGINE=INNODB;
INSERT INTO dbb.td1 VALUES (1),(2),(3),(4),(5);
CREATE TABLE dbb.td3(id INT, a CHAR(5))ENGINE=INNODB;
INSERT INTO dbb.td3 VALUES(1,'a'),(2,'b'),(3,'c'),(4,'e');
CREATE TABLE dbb.te1(id INT)ENGINE=INNODB;
INSERT INTO dbb.te1 VALUES(1),(2),(3),(4);
#
# Run innobackup for table backup only (Partial backup)
......
SELECT backup_type FROM mysql.backup_history;
backup_type
PARTIAL
meb.satya                                [ fail ]
[31 Aug 2010 22:33] Hema Sridharan
The issue is fixed in the latest patch. Hence closing the bug.