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
1=== modified file 'patches/mysql-test.diff'
2--- patches/mysql-test.diff 2011-09-07 14:00:24 +0000
3+++ patches/mysql-test.diff 2011-09-23 14:30:33 +0000
4@@ -1297,7 +1297,7 @@
5 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
6 --- /dev/null
7 +++ b/mysql-test/r/percona_server_variables_debug.result
8-@@ -0,0 +1,373 @@
9+@@ -0,0 +1,374 @@
10 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
11 +Variable_name
12 +AUTOCOMMIT
13@@ -1488,6 +1488,7 @@
14 +LOG_OUTPUT
15 +LOG_QUERIES_NOT_USING_INDEXES
16 +LOG_SLAVE_UPDATES
17++LOG_SLOW_ADMIN_STATEMENTS
18 +LOG_SLOW_FILTER
19 +LOG_SLOW_QUERIES
20 +LOG_SLOW_RATE_LIMIT
21@@ -1673,7 +1674,7 @@
22 +WARNING_COUNT
23 --- /dev/null
24 +++ b/mysql-test/r/percona_server_variables_release.result
25-@@ -0,0 +1,369 @@
26+@@ -0,0 +1,370 @@
27 +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1;
28 +Variable_name
29 +AUTOCOMMIT
30@@ -1861,6 +1862,7 @@
31 +LOG_OUTPUT
32 +LOG_QUERIES_NOT_USING_INDEXES
33 +LOG_SLAVE_UPDATES
34++LOG_SLOW_ADMIN_STATEMENTS
35 +LOG_SLOW_FILTER
36 +LOG_SLOW_QUERIES
37 +LOG_SLOW_RATE_LIMIT
38
39=== modified file 'patches/slow_extended.patch'
40--- patches/slow_extended.patch 2011-09-21 16:16:06 +0000
41+++ patches/slow_extended.patch 2011-09-23 14:30:33 +0000
42@@ -424,12 +424,16 @@
43 my_bool lower_case_file_system= 0;
44 my_bool opt_large_pages= 0;
45 my_bool opt_super_large_pages= 0;
46-@@ -5896,10 +5900,10 @@
47+@@ -5892,14 +5896,14 @@
48+ "Don't log extra information to update and slow-query logs.",
49+ &opt_short_log_format, &opt_short_log_format,
50+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
51+- {"log-slow-admin-statements", 0,
52++ /*{"log-slow-admin-statements", 0,
53 "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to "
54 "the slow log if it is open.", &opt_log_slow_admin_statements,
55 &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
56-- {"log-slow-slave-statements", 0,
57-+ /*{"log-slow-slave-statements", 0,
58+ {"log-slow-slave-statements", 0,
59 "Log slow statements executed by slave thread to the slow log if it is open.",
60 &opt_log_slow_slave_statements, &opt_log_slow_slave_statements,
61 - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
62@@ -979,7 +983,7 @@
63 static bool fix_low_prio_updates(sys_var *self, THD *thd, enum_var_type type)
64 {
65 if (type == OPT_SESSION)
66-@@ -2898,6 +2921,117 @@
67+@@ -2898,6 +2921,123 @@
68 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
69 ON_UPDATE(fix_log_state));
70
71@@ -1054,6 +1058,12 @@
72 + "Log queries replayed be the slave SQL thread",
73 + GLOBAL_VAR(opt_log_slow_slave_statements), CMD_LINE(OPT_ARG),
74 + DEFAULT(FALSE));
75++static Sys_var_mybool Sys_log_slow_admin_statements(
76++ "log_slow_admin_statements",
77++ "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements"
78++ " to the slow log if it is open.",
79++ GLOBAL_VAR(opt_log_slow_admin_statements), CMD_LINE(OPT_ARG),
80++ DEFAULT(FALSE));
81 +static Sys_var_mybool Sys_log_slow_sp_statements(
82 + "log_slow_sp_statements",
83 + "Log slow statements executed by stored procedure to the slow log if it is open.",
84@@ -2415,3 +2425,13 @@
85 +--let grep_pattern = Last_errno: 1050
86 +--source include/log_grep.inc
87 +DROP TABLE t;
88+--- /dev/null
89++++ b/mysql-test/suite/sys_vars/t/log_slow_admin_statements_basic.test
90+@@ -0,0 +1 @@
91++SELECT @@global.log_slow_admin_statements;
92+--- /dev/null
93++++ b/mysql-test/suite/sys_vars/r/log_slow_admin_statements_basic.result
94+@@ -0,0 +1,3 @@
95++SELECT @@global.log_slow_admin_statements;
96++@@global.log_slow_admin_statements
97++0

Subscribers

People subscribed via source and target branches