Bug #60064 Current_state field shows empty in progress tables for failed backup operations
Submitted: 9 Feb 2011 23:15 Modified: 16 Mar 2011 9:39
Reporter: Hema Sridharan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:MEB 3.6s OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: regression

[9 Feb 2011 23:15] Hema Sridharan
Description:
Execute mysqlbackup to a backup directory
Now once again run backup to same backup directory without deleting the previous backup dir.
This backup will fail as it cannot overwrite the data in backup directory.
It will error out as
mysqlbackup: ERROR: Backup directory already exists and is not empty.
  Please remove backup directory and retry.

Now check the mysql.backup_progress table for details, it shows empty current_state.

How to repeat:
1. Execute MEB to backup dir
2. Once again execute MEB to same backup dir (without deleting the previous one)
3. Check the backup_progress tables, it will show the following

Suggested fix:
mysql> select * from mysql.backup_progress\G
*************************** 1. row ***************************
    backup_id: 12972928490421630
    tool_name: mysqlbackup
   error_code: 0
error_message: Backup directory already exists and is not empty.
  Please remove backup directory and retry.

 current_time: 2011-02-10 02:07:29
current_state:

If you notice, current_state shows empty. It will be better to indicate that "mysqlbackup returns failure". This is what we used to get in MEB 3.5.2 versions. It will good to have the same behavior in this version also
[10 Feb 2011 18:55] Valeriy Kravchuk
Verified just as described on Mac OS X:

macbook-pro:5.1 openxs$ bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.5.10-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select * from mysql.backup_progress\G
*************************** 1. row ***************************
    backup_id: 12973637017716110
    tool_name: mysqlbackup
   error_code: 0
error_message: NO_ERROR
 current_time: 2011-02-10 20:48:21
current_state: Started mysqlbackup.
*************************** 2. row ***************************
    backup_id: 12973637017716110
    tool_name: mysqlbackup
   error_code: 0
error_message: NO_ERROR
 current_time: 2011-02-10 20:48:23
current_state: mysqlbackup locking tables and copying .frm + other engines data.
*************************** 3. row ***************************
    backup_id: 12973637017716110
    tool_name: mysqlbackup
   error_code: 0
error_message: NO_ERROR
 current_time: 2011-02-10 20:48:25
current_state: mysqlbackup unlocked the tables.
*************************** 4. row ***************************
    backup_id: 0
    tool_name: mysqlbackup
   error_code: 0
error_message: NO_ERROR
 current_time: 2011-02-10 20:48:26
current_state: mysqlbackup returns success.
*************************** 5. row ***************************
    backup_id: 12973640168849350
    tool_name: mysqlbackup
   error_code: 0
error_message: Backup directory already exists and is not empty.
  Please remove backup directory and retry.

 current_time: 2011-02-10 20:53:36
current_state: 
5 rows in set (0.00 sec)
[16 Feb 2011 9:39] Thava Alagu
Please check if the latest patch solves the issue.
[17 Mar 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".