Bug #57308 Table mysql.backup_history - some issues
Submitted: 7 Oct 2010 11:19 Modified: 2 Dec 2010 0:12
Reporter: Victor Kirkebo Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:3.5 OS:Any
Assigned to: Satya B CPU Architecture:Any

[7 Oct 2010 11:19] Victor Kirkebo
Description:
I took a look at the mysql.backup_history table after a backup had been done.
I have the following comments:

1) The binlog_file column contains the name of the binlog_file plus a comma ",".
mysql> select binlog_file from mysql.backup_history;
+--------------------+
| binlog_file        |
+--------------------+
| master-bin.000002, |
+--------------------+
1 row in set (0.00 sec)

The comma after the file name should be removed.

2) The lock_time column is of type double(5,3) and only permists values up to 99.999.
mysql> select * from lock_time;
ERROR 1146 (42S02): Table 'mysql.lock_time' doesn't exist
mysql> select lock_time from mysql.backup_history;
+-----------+
| lock_time |
+-----------+
|    99.999 |
+-----------+

I often see lock times of more than 100sec. I suggest changing the range of the column type to allow for values above 100.

3) The columns mysql_data_dir, innodb_data_home_dir, innodb_log_group_home_dir and backup_destination column are of type varchar(100). I often need more than that in order to get the whole name stored. I suggest increasing the varchar length.

4) The columns innodb_log_files_in_group and innodb_log_file_size are of type varchar(100). I suggest using a numeric column type.

How to repeat:
1) Run a backup
2) Connect to the database and check the definition and contents of the table mysql.backup_history
[12 Oct 2010 9:09] Satya B
comma issue has been fixed. May be the meb-3.5.next-release branch has not been rebuilt after the fix.

Regarding the lock_time, I've misunderstood the double (5,3). This should be increased.

Innodb variables should be increased.
[19 Oct 2010 6:43] Satya B
"`innodb_log_files_in_group` VARCHAR(100) NOT NULL, "
    "`innodb_log_file_size` VARCHAR(100) NOT NULL, 

are collected from config_options structure which defined them as char *. 

As a temporary solution, it is easy convert innodb_log_fies_in_group to integer by using atoi() but not the innodb_log_file_size. innodb_log_file_size can be given as 5M. A manual handling of M G, K, should be done.

Proper solution would be declare these variables as Integers in mysqlbackup code.

For now, I suggest to postpone this change. All the other suggestions should be fixed.
[19 Oct 2010 10:34] Satya B
Setting Thava and Anurag as reviewers
[29 Oct 2010 12:04] Satya B
branch: meb-3.5.next
revno: 250
revision-id: satya.bn@sun.com-20101029120245-oooutb27w3yp30ut