Bug #42625 The backup_history_log_file variable gets wrong value.
Submitted: 5 Feb 2009 16:00 Modified: 23 Feb 2009 22:21
Reporter: Rafal Somla Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0-backup OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[5 Feb 2009 16:00] Rafal Somla
Description:
After setting backup_history_log_file variable it shows wrong value.

How to repeat:
set global backup_history_log_file= history.txt;
select @@backup_history_log_file;

In my case the select shows 'txt' instead of 'history.txt'.
[5 Feb 2009 17:42] MySQL Verification Team
Thank you for the bug report. Verified as described:

mysql> set global backup_history_log_file= history.txt;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@backup_history_log_file;
+---------------------------+
| @@backup_history_log_file |
+---------------------------+
| txt                       |
+---------------------------+
1 row in set (0.00 sec)
[19 Feb 2009 20:55] Chuck Bell
If one uses quotes, the command succeeds:

mysql> set global backup_history_log_file='history.txt';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@backup_history_log_file;
+---------------------------+
| @@backup_history_log_file |
+---------------------------+
| history.txt               |
+---------------------------+
1 row in set (0.00 sec)
[19 Feb 2009 20:59] Chuck Bell
This bug is not unique to backup. The problem occurs in the slow_query_log_file variable too:

mysql> set global slow_query_log_file=slow.txt;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@slow_query_log_file;
+-----------------------+
| @@slow_query_log_file |
+-----------------------+
| txt                   |
+-----------------------+
1 row in set (0.00 sec)
[19 Feb 2009 21:06] Chuck Bell
If you trace the command:

set global slow_query_log_file=slow.txt

we see at line# 2591 that the call

  uint str_length= (var ? var->value->str_value.length() : 0);

returns a length of 3.
[23 Feb 2009 22:21] Chuck Bell
This is not a bug. One must use quotes when setting variables that take string values. This is true for all of the system variables.