pt-config-diff doesn't handle empty values correctly (secure_file_priv)

Bug #1654985 reported by babine
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

Basically, the variable is set to empty in the config file, but pt-config-diff "defaults" it to "ON" and this leads to a difference in the configuration :

# ./pt-config-diff --version
pt-config-diff 2.2.20

# pt-config-diff /etc/mysql/my.cnf localhost
2 config differences
Variable /etc/mysql/my.cnf <server_name>
========================= ================= =================================
secure_file_priv ON

# grep secure_file_priv /etc/mysql/my.cnf
secure_file_priv = ""

mysql> show variables like 'secure_file_priv';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| secure_file_priv | |
+------------------+-------+
1 row in set (0.00 sec)

It's probably in the "_mimic_show_variables" sub. Commenting "$vars->{$var} = 'ON';" seems to do the trick but it breaks the support for variables you can put in the config file without a value (eg. innodb_file_per_table, skip_name_resolve...)

Revision history for this message
Jericho Rivera (jericho-rivera) wrote :

If compared by logging in to the server, the correct view as expected:
[root@pxc2 ~]# pt-config-diff h=localhost,u=root h=10.0.3.206,u=ptuser,p=ptpass | grep secure_file
secure_file_priv /var/lib/mysql-files/

If compared directly from file, the tool defaults it to ON:
[root@pxc2 ~]# pt-config-diff /etc/my.cnf h=10.0.3.206,u=ptuser,p=ptpass | grep secure_file
secure_file_priv ON /var/lib/mysql-files/

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1406

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.