Merge lp:~tsarev/percona-server/test55_691404 into lp:percona-server/5.5

Proposed by Oleg Tsarev
Status: Superseded
Proposed branch: lp:~tsarev/percona-server/test55_691404
Merge into: lp:percona-server/5.5
Diff against target: 97 lines (+28/-6)
2 files modified
patches/mysql-test.diff (+4/-2)
patches/slow_extended.patch (+24/-4)
To merge this branch: bzr merge lp:~tsarev/percona-server/test55_691404
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Needs Fixing
Laurynas Biveinis (community) Needs Fixing
Review via email: mp+76362@code.launchpad.net

This proposal supersedes a proposal from 2011-09-12.

This proposal has been superseded by a proposal from 2011-09-27.

Description of the change

Fix bug #691404 - add log-slow-admin-statements to GLOBAL_VARIABLES
(dev-info: remove command-line option from sql/mysqld.cc, add sys_var_... to sql/sys_vars.cc (affects to CLI too))

To post a comment you must log in.
Revision history for this message
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal
Revision history for this message
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Please move percona_log_slow_admin_statements.test to sys_vars suite with a name log_slow_admin_statements_basic.test. This way all_vars test will not consider this variable unhandled.

review: Needs Fixing
Revision history for this message
Oleg Tsarev (tsarev) wrote :
Revision history for this message
Oleg Tsarev (tsarev) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The test needs renaming as in my previous comment

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

1. What's the point to declare log-slow-admin-statements as OPT_ARG? What was wrong with NO_ARG?
2. What's the point in commenting out command line options in mysqld.cc instead of removing them? For this specific MP, it is sufficient to only remove log-slow-admin-statetements. There's no need to remove all of commented ones in this MP.

review: Needs Fixing
Revision history for this message
Oleg Tsarev (tsarev) wrote :

Similar to bug #712387
With NO_ARG syntax --variable_name=ON not work

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'patches/mysql-test.diff'
--- patches/mysql-test.diff 2011-09-07 14:00:24 +0000
+++ patches/mysql-test.diff 2011-09-23 14:30:33 +0000
@@ -1297,7 +1297,7 @@
1297+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;1297+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
1298--- /dev/null1298--- /dev/null
1299+++ b/mysql-test/r/percona_server_variables_debug.result1299+++ b/mysql-test/r/percona_server_variables_debug.result
1300@@ -0,0 +1,373 @@1300@@ -0,0 +1,374 @@
1301+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;1301+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
1302+Variable_name1302+Variable_name
1303+AUTOCOMMIT1303+AUTOCOMMIT
@@ -1488,6 +1488,7 @@
1488+LOG_OUTPUT1488+LOG_OUTPUT
1489+LOG_QUERIES_NOT_USING_INDEXES1489+LOG_QUERIES_NOT_USING_INDEXES
1490+LOG_SLAVE_UPDATES1490+LOG_SLAVE_UPDATES
1491+LOG_SLOW_ADMIN_STATEMENTS
1491+LOG_SLOW_FILTER1492+LOG_SLOW_FILTER
1492+LOG_SLOW_QUERIES1493+LOG_SLOW_QUERIES
1493+LOG_SLOW_RATE_LIMIT1494+LOG_SLOW_RATE_LIMIT
@@ -1673,7 +1674,7 @@
1673+WARNING_COUNT1674+WARNING_COUNT
1674--- /dev/null1675--- /dev/null
1675+++ b/mysql-test/r/percona_server_variables_release.result1676+++ b/mysql-test/r/percona_server_variables_release.result
1676@@ -0,0 +1,369 @@1677@@ -0,0 +1,370 @@
1677+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;1678+SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
1678+Variable_name1679+Variable_name
1679+AUTOCOMMIT1680+AUTOCOMMIT
@@ -1861,6 +1862,7 @@
1861+LOG_OUTPUT1862+LOG_OUTPUT
1862+LOG_QUERIES_NOT_USING_INDEXES1863+LOG_QUERIES_NOT_USING_INDEXES
1863+LOG_SLAVE_UPDATES1864+LOG_SLAVE_UPDATES
1865+LOG_SLOW_ADMIN_STATEMENTS
1864+LOG_SLOW_FILTER1866+LOG_SLOW_FILTER
1865+LOG_SLOW_QUERIES1867+LOG_SLOW_QUERIES
1866+LOG_SLOW_RATE_LIMIT1868+LOG_SLOW_RATE_LIMIT
18671869
=== modified file 'patches/slow_extended.patch'
--- patches/slow_extended.patch 2011-09-21 16:16:06 +0000
+++ patches/slow_extended.patch 2011-09-23 14:30:33 +0000
@@ -424,12 +424,16 @@
424 my_bool lower_case_file_system= 0;424 my_bool lower_case_file_system= 0;
425 my_bool opt_large_pages= 0;425 my_bool opt_large_pages= 0;
426 my_bool opt_super_large_pages= 0;426 my_bool opt_super_large_pages= 0;
427@@ -5896,10 +5900,10 @@427@@ -5892,14 +5896,14 @@
428 "Don't log extra information to update and slow-query logs.",
429 &opt_short_log_format, &opt_short_log_format,
430 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
431- {"log-slow-admin-statements", 0,
432+ /*{"log-slow-admin-statements", 0,
428 "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to "433 "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to "
429 "the slow log if it is open.", &opt_log_slow_admin_statements,434 "the slow log if it is open.", &opt_log_slow_admin_statements,
430 &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},435 &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
431- {"log-slow-slave-statements", 0,436 {"log-slow-slave-statements", 0,
432+ /*{"log-slow-slave-statements", 0,
433 "Log slow statements executed by slave thread to the slow log if it is open.",437 "Log slow statements executed by slave thread to the slow log if it is open.",
434 &opt_log_slow_slave_statements, &opt_log_slow_slave_statements,438 &opt_log_slow_slave_statements, &opt_log_slow_slave_statements,
435- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},439- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -979,7 +983,7 @@
979 static bool fix_low_prio_updates(sys_var *self, THD *thd, enum_var_type type)983 static bool fix_low_prio_updates(sys_var *self, THD *thd, enum_var_type type)
980 {984 {
981 if (type == OPT_SESSION)985 if (type == OPT_SESSION)
982@@ -2898,6 +2921,117 @@986@@ -2898,6 +2921,123 @@
983 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),987 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
984 ON_UPDATE(fix_log_state));988 ON_UPDATE(fix_log_state));
985 989
@@ -1054,6 +1058,12 @@
1054+ "Log queries replayed be the slave SQL thread",1058+ "Log queries replayed be the slave SQL thread",
1055+ GLOBAL_VAR(opt_log_slow_slave_statements), CMD_LINE(OPT_ARG),1059+ GLOBAL_VAR(opt_log_slow_slave_statements), CMD_LINE(OPT_ARG),
1056+ DEFAULT(FALSE));1060+ DEFAULT(FALSE));
1061+static Sys_var_mybool Sys_log_slow_admin_statements(
1062+ "log_slow_admin_statements",
1063+ "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements"
1064+ " to the slow log if it is open.",
1065+ GLOBAL_VAR(opt_log_slow_admin_statements), CMD_LINE(OPT_ARG),
1066+ DEFAULT(FALSE));
1057+static Sys_var_mybool Sys_log_slow_sp_statements(1067+static Sys_var_mybool Sys_log_slow_sp_statements(
1058+ "log_slow_sp_statements",1068+ "log_slow_sp_statements",
1059+ "Log slow statements executed by stored procedure to the slow log if it is open.",1069+ "Log slow statements executed by stored procedure to the slow log if it is open.",
@@ -2415,3 +2425,13 @@
2415+--let grep_pattern = Last_errno: 10502425+--let grep_pattern = Last_errno: 1050
2416+--source include/log_grep.inc2426+--source include/log_grep.inc
2417+DROP TABLE t;2427+DROP TABLE t;
2428--- /dev/null
2429+++ b/mysql-test/suite/sys_vars/t/log_slow_admin_statements_basic.test
2430@@ -0,0 +1 @@
2431+SELECT @@global.log_slow_admin_statements;
2432--- /dev/null
2433+++ b/mysql-test/suite/sys_vars/r/log_slow_admin_statements_basic.result
2434@@ -0,0 +1,3 @@
2435+SELECT @@global.log_slow_admin_statements;
2436+@@global.log_slow_admin_statements
2437+0

Subscribers

People subscribed via source and target branches