mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Add UI options for enabling the slow query log
https://github.com/webmin/webmin/issues/2560
This commit is contained in:
@@ -63,6 +63,21 @@ $sql_mode = &find_value("sql_mode", $mems);
|
||||
print &ui_table_row($text{'cnf_sqlm'},
|
||||
&ui_opt_textbox("sqlm", $sql_mode, 60, $text{'default'}), 3);
|
||||
|
||||
# Slow query log options
|
||||
$slow_query_log = &find_value("slow_query_log", $mems);
|
||||
print &ui_table_row($text{'cnf_slow'},
|
||||
&ui_yesno_radio("slow", $slow_query_log));
|
||||
|
||||
$long_query_time = &find_value("long_query_time", $mems);
|
||||
print &ui_table_row($text{'cnf_long'},
|
||||
&ui_opt_textbox("long", $long_query_time, 8,
|
||||
$text{'cnf_long_def'})." ".$text{'cnf_long_secs'});
|
||||
|
||||
$slow_query_log_file = &find_value("slow_query_log_file", $mems);
|
||||
print &ui_table_row($text{'cnf_slow_file'},
|
||||
&ui_opt_textbox("slow_file", $slow_query_log_file, 40,
|
||||
$text{'cnf_slow_file_def'}), 3);
|
||||
|
||||
# Show set variables
|
||||
print &ui_table_hr();
|
||||
|
||||
|
||||
@@ -765,6 +765,14 @@ cnf_ilt=InnoDB lock timeout (in seconds)
|
||||
cnf_eilt=InnoDB lock timeout must be an integer
|
||||
cnf_sqlm=SQL mode options
|
||||
cnf_esqlm=SQL mode options must be a comma-separate list of flags
|
||||
cnf_slow=Enable slow query log?
|
||||
cnf_slow_file=Slow query log file
|
||||
cnf_slow_file_def=Default path
|
||||
cnf_eslow_file=Missing slow query log file path
|
||||
cnf_long=Time for query to be considered slow
|
||||
cnf_long_def=Default (10 seconds)
|
||||
cnf_long_secs=seconds
|
||||
cnf_elong=Slow query time must be a number of seconds
|
||||
|
||||
manual_title=Edit Config Files
|
||||
manual_file=Edit config file:
|
||||
|
||||
@@ -78,6 +78,18 @@ else {
|
||||
&save_directive($conf, $mysqld, "big-tables",
|
||||
$in{'big-tables'} ? [ "" ] : [ ]);
|
||||
|
||||
# Save slow query log options
|
||||
&save_directive($conf, $mysqld, "slow_query_log",
|
||||
[ $in{'slow'} ]);
|
||||
$in{'slow_file_def'} || $in{'slow_file'} =~ /^\S+$/ ||
|
||||
&error($text{'cnf_eslow_file'});
|
||||
&save_directive($conf, $mysqld, "slow_query_log_file",
|
||||
$in{'slow_file_def'} ? [ ] : [ $in{'slow_file'} ]);
|
||||
$in{'long_def'} || $in{'long'} =~ /^\d+$/ ||
|
||||
&error($text{'cnf_elong'});
|
||||
&save_directive($conf, $mysqld, "long_query_time",
|
||||
$in{'long_def'} ? [ ] : [ $in{'long'} ]);
|
||||
|
||||
# Save set variables
|
||||
%vars = &parse_set_variables(&find_value("set-variable", $mems));
|
||||
foreach $w (@mysql_set_variables) {
|
||||
|
||||
Reference in New Issue
Block a user