Merge lp:~tsarev/percona-server/test51_691404 into lp:percona-server/5.1

Proposed by Oleg Tsarev
Status: Superseded
Proposed branch: lp:~tsarev/percona-server/test51_691404
Merge into: lp:percona-server/5.1
Diff against target: 108 lines (+31/-6)
3 files modified
patches/query_cache_enhance.patch (+3/-3)
patches/response_time_distribution.patch (+1/-1)
patches/slow_extended.patch (+27/-2)
To merge this branch: bzr merge lp:~tsarev/percona-server/test51_691404
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Needs Fixing
Laurynas Biveinis (community) Approve
Review via email: mp+74982@code.launchpad.net

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

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

Description of the change

Fixed bug #691404 - add log_slow_admin_statements to GLOBAL_VARIABLES
(dev-info: add sys_var... to sql/set_var.cc)

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 :
Revision history for this message
Oleg Tsarev (tsarev) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

LGTM

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

What's the point to declare log-slow-admin-statements as OPT_ARG? What was wrong with NO_ARG?

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

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

This has nothing to do with bug #712387 which was about incorrectly used REQUIRED_ARG type. Here you are changing NO_ARG to OPT_ARG.

If you make a boolean variable OPT_ARG and then use the "--variable_name=ON" syntax, it will do not quite what you expect in 5.1 -- just test it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/query_cache_enhance.patch'
2--- patches/query_cache_enhance.patch 2011-09-06 08:23:51 +0000
3+++ patches/query_cache_enhance.patch 2011-09-12 12:31:46 +0000
4@@ -156,7 +156,7 @@
5 static sys_var_const_str_ptr sys_repl_report_password(&vars, "report_password", &report_password);
6
7 static uchar *slave_get_report_port(THD *thd)
8-@@ -1255,10 +1262,9 @@
9+@@ -1257,10 +1264,9 @@
10 {}
11 #endif /* HAVE_REPLICATION */
12
13@@ -168,7 +168,7 @@
14 ulong new_cache_size= query_cache.resize(query_cache_size);
15
16 /*
17-@@ -1272,11 +1278,35 @@
18+@@ -1274,11 +1280,35 @@
19 query_cache_size, new_cache_size);
20
21 query_cache_size= new_cache_size;
22@@ -206,7 +206,7 @@
23 static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type)
24 {
25 query_cache_min_res_unit=
26-@@ -3634,6 +3664,16 @@
27+@@ -3636,6 +3666,16 @@
28 Functions to handle SET mysql_internal_variable=const_expr
29 *****************************************************************************/
30
31
32=== modified file 'patches/response_time_distribution.patch'
33--- patches/response_time_distribution.patch 2011-07-30 23:07:03 +0000
34+++ patches/response_time_distribution.patch 2011-09-12 12:31:46 +0000
35@@ -3090,7 +3090,7 @@
36 +#endif // QUERY_RESPONSE_TIME_H
37 --- a/sql/set_var.cc
38 +++ b/sql/set_var.cc
39-@@ -1022,6 +1022,18 @@
40+@@ -1024,6 +1024,18 @@
41 &SV::query_exec_time,
42 sys_var::SESSION_VARIABLE_IN_BINLOG);
43 #endif
44
45=== modified file 'patches/slow_extended.patch'
46--- patches/slow_extended.patch 2011-08-09 13:35:34 +0000
47+++ patches/slow_extended.patch 2011-09-12 12:31:46 +0000
48@@ -621,6 +621,15 @@
49 OPT_IGNORE_BUILTIN_INNODB,
50 OPT_BINLOG_DIRECT_NON_TRANS_UPDATE,
51 OPT_DEFAULT_CHARACTER_SET_OLD,
52+@@ -6135,7 +6149,7 @@
53+ {"log-slow-admin-statements", OPT_LOG_SLOW_ADMIN_STATEMENTS,
54+ "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements "
55+ "to the slow log if it is open.", &opt_log_slow_admin_statements,
56+- &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
57++ &opt_log_slow_admin_statements, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
58+ {"log-slow-slave-statements", OPT_LOG_SLOW_SLAVE_STATEMENTS,
59+ "Log slow statements executed by slave thread to the slow log if it is open.",
60+ &opt_log_slow_slave_statements,
61 @@ -6836,6 +6850,36 @@
62 "microsecond precision.",
63 &long_query_time, &long_query_time, 0, GET_DOUBLE,
64@@ -805,7 +814,7 @@
65 static sys_var_thd_ulong
66 sys_auto_increment_increment(&vars, "auto_increment_increment",
67 &SV::auto_increment_increment, NULL, NULL,
68-@@ -901,6 +969,35 @@
69+@@ -901,6 +969,37 @@
70 QUERY_LOG_GENERAL);
71 static sys_var_log_state sys_var_slow_query_log(&vars, "slow_query_log", &opt_slow_log,
72 QUERY_LOG_SLOW);
73@@ -824,6 +833,8 @@
74 + SLOG_V_INVALID,
75 + slog_verb);
76 +static sys_var_use_global_log_slow_control sys_use_global_log_slow_control;
77++static sys_var_bool_ptr sys_log_slow_admin_statements(&vars, "log_slow_admin_statements",
78++ &opt_log_slow_admin_statements);
79 +static sys_var_bool_ptr sys_log_slow_slave_statements(&vars, "log_slow_slave_statements",
80 + &opt_log_slow_slave_statements);
81 +static sys_var_bool_ptr sys_log_slow_sp_statements(&vars, "log_slow_sp_statements",
82@@ -841,7 +852,7 @@
83 /* Synonym of "slow_query_log" for consistency with SHOW VARIABLES output */
84 static sys_var_log_state sys_var_log_slow(&vars, "log_slow_queries",
85 &opt_slow_log, QUERY_LOG_SLOW);
86-@@ -3711,6 +3808,203 @@
87+@@ -3711,6 +3810,203 @@
88 #endif
89 }
90
91@@ -2575,3 +2586,17 @@
92 /* Intvar event post-header */
93
94 /* Intvar event data */
95+--- /dev/null
96++++ b/mysql-test/r/percona_log_slow_admin_statements.result
97+@@ -0,0 +1,6 @@
98++SHOW GLOBAL VARIABLES like 'log_slow_admin_statements';
99++Variable_name Value
100++log_slow_admin_statements OFF
101++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_slow_admin_statements';
102++VARIABLE_NAME VARIABLE_VALUE
103++LOG_SLOW_ADMIN_STATEMENTS OFF
104+--- /dev/null
105++++ b/mysql-test/t/percona_log_slow_admin_statements.test
106+@@ -0,0 +1,2 @@
107++SHOW GLOBAL VARIABLES like 'log_slow_admin_statements';
108++SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_slow_admin_statements';

Subscribers

People subscribed via source and target branches