Bug #59860 log-slow-admin-statements and log-slow-slave-statements not displayed
Submitted: 1 Feb 2011 1:28 Modified: 22 Feb 2013 3:49
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1, 5.5, trunk OS:Any
Assigned to: Mark Leith CPU Architecture:Any
Tags: show
Triage: Triaged: D3 (Medium)

[1 Feb 2011 1:28] Mark Callaghan
Description:
SHOW GLOBAL VARIABLES does not display the values for these

  {"log-slow-admin-statements", OPT_LOG_SLOW_ADMIN_STATEMENTS,
   "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements "
   "to the slow log if it is open.", &opt_log_slow_admin_statements,
   &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
 {"log-slow-slave-statements", OPT_LOG_SLOW_SLAVE_STATEMENTS,
  "Log slow statements executed by slave thread to the slow log if it is open.",
  &opt_log_slow_slave_statements,
  &opt_log_slow_slave_statements,
  0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},

How to repeat:
run SHOW GLOBAL VARIABLES, grep set_var.cc

Suggested fix:
update set_var.cc
[1 Feb 2011 4:24] Valeriy Kravchuk
Thank you for the bug report.
[1 Feb 2011 10:28] Peter Laursen
As far as I can see they are not listed on documentation pages either (for neither options nor variables).
[10 Feb 2011 11:37] Baron Schwartz
More importantly, they can't be set at runtime if they aren't in SHOW VARIABLES.  A server restart to change this functionality is not as good as changing it online.
[10 Aug 2012 15:14] Rolf Martin-Hoster
Additonally, slow_query_log must be enabled at runtime, as well as long_query_time in order for log_slow_slave_statements to work. However, both the slow_query_log and long_query_time can be adjusted online as expected.
[29 Nov 2012 17:58] Przemyslaw Malkowski
Regarding documentation I'd like to correct that the log-slow-slave-statements variable is missing on the "Server System Variables" page, while it's described in "Replication Slave Options and Variables" - http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_log-sl...
[22 Feb 2013 3:49] Paul Dubois
Noted in 5.6.11, 5.7.1 changelogs.

The --log-slow-admin-statements and --log-slow-slave-statements
command options now are exposed at runtime as the
low_slow_admin_statements and low_slow_slave_statements system
variables. Their values can be examined using SHOW VARIABLES. The
variables are dynamic, so their values can can be set at runtime.
(The options were actually replaced by the system variables, but as
system variables can be set at server startup, no option 
functionality is lost.)
[22 Feb 2013 3:56] Paul Dubois
re: "Regarding documentation I'd like to correct that the log-slow-slave-statements variable is missing on the "Server System Variables" page, while it's described in "Replication Slave Options and Variables" - http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#option_mysqld_log-sl..."

Correct. That's intentional.