pt-variable-advisor sort_buffer_size-1 says to leave at default when it's already the default (MySQL >= 5.6.4)

Bug #1283754 reported by Matthew Haughton on 2014-02-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Undecided
Unassigned

Bug Description

The default value for sort_buffer_size changed from 2097144 in versions before 5.6.4 to 262144 in 5.6.4 and higher (see https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_sort_buffer_size).

The current sort_buffer_size-1 check is hard coded to fail if sort_buffer_size != 2097144. When the check fails it shows a warning saying the variable should be left at the default value, even if it's already at the default 262144 in 5.6.4 and up.

This should be updated to perhaps check the version of MySQL and adjust the expected value accordingly, or to specify that sort_buffer_size should be set to 2097144, or updated so it's more relevant in the latest MySQL releases.

tags: added: pt-variable-advisor

This was easy to confirm with 5.6.19 and version 2.2.10 of the toolkit:

[openxs@centos ~]$ mysql -uroot -e 'select version(), @@sort_buffer_size'
+-------------+--------------------+
| version() | @@sort_buffer_size |
+-------------+--------------------+
| 5.6.19-67.0 | 262144 |
+-------------+--------------------+
[openxs@centos ~]$ pt-variable-advisor --version
pt-variable-advisor 2.2.10
[openxs@centos ~]$ pt-variable-advisor h=localhost | grep sort
# NOTE sort_buffer_size-1: The sort_buffer_size variable should generally be left at its default unless an expert determines it is necessary to change it.
[openxs@centos ~]$ mysql -uroot -e 'set global sort_buffer_size=DEFAULT'
[openxs@centos ~]$ mysql -uroot -e 'select version(), @@sort_buffer_size'
+-------------+--------------------+
| version() | @@sort_buffer_size |
+-------------+--------------------+
| 5.6.19-67.0 | 262144 |
+-------------+--------------------+

Changed in percona-toolkit:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers