Allow setting of query cache size
authorJamie Cameron <jcameron@webmin.com>
Sun, 22 May 2011 17:06:45 +0000 (10:06 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sun, 22 May 2011 17:06:45 +0000 (10:06 -0700)
http://www.virtualmin.com/node/18275

mysql/lang/en
mysql/list_vars.cgi
mysql/mysql-lib.pl

index 57f00c9..ee8441e 100644 (file)
@@ -746,6 +746,7 @@ cnf_edatadir=Missing or invalid database files directory
 cnf_key_buffer=Key buffer size
 cnf_max_allowed_packet=Maximum packet size
 cnf_max_connections=Maximum number of connections
+cnf_query_cache_size=Query cache size in bytes
 cnf_table_cache=Tables to cache
 cnf_sort_buffer=Sort buffer size
 cnf_net_buffer_length=Network buffer size
@@ -826,6 +827,7 @@ kill_ecannot=You are not allowed to manage database connections
 kill_enone=None selected
 
 vars_title=MySQL System Variables
+vars_desc=Warning - Variables set on this page will be reset to their default values when MySQL is restarted. Permanent settings must be made on the <a href='$1'>MySQL Server Configuration</a> page.
 vars_ecannot=You are not allowed to edit system variables
 vars_name=Variable name
 vars_value=Current value
index 436bee2..fb55963 100755 (executable)
@@ -7,6 +7,8 @@ $access{'perms'} == 1 || &error($text{'vars_ecannot'});
 &ReadParse();
 %d = map { $_, 1 } split(/\0/, $in{'d'});
 
+print &text('vars_desc', 'edit_cnf.cgi'),"<p>\n";
+
 # Work out which ones can be edited
 %canedit = map { $_->[0], 1 } &list_system_variables();
 
index 8283488..676fc7c 100755 (executable)
@@ -86,7 +86,8 @@ $old_db_priv_cols = $mysql_version >= 4 ? 12 : 10;
 @mysql_set_variables = ( "key_buffer", "max_allowed_packet",
                         "sort_buffer", "net_buffer_length",
                         "myisam_sort_buffer_size" );
-@mysql_number_variables = ( "table_cache", "max_connections" );
+@mysql_number_variables = ( "table_cache", "max_connections",
+                           "query_cache_size" );
 
 # make_authstr([login], [pass], [host], [port], [sock])
 sub make_authstr