summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot3.local>2006-12-20 00:00:46 +0100
committerunknown <guilhem@gbichot3.local>2006-12-20 00:00:46 +0100
commit8b998d1199d53baf002f6ad725fa69e4b2f6813b (patch)
tree335d7c85728da44b45a4541bf523c09f0ab36f13 /sql/set_var.cc
parent8a2b3baaa9da6b94f0f609c1959ad00929ec7621 (diff)
parentc2f2a41ed32522fa89f5c79fec42ab60e0b4aa62 (diff)
downloadmariadb-git-8b998d1199d53baf002f6ad725fa69e4b2f6813b.tar.gz
Merge gbichot3.local:/home/mysql_src/mysql-5.1-clean
into gbichot3.local:/home/mysql_src/mysql-maria BitKeeper/etc/ignore: auto-union BUILD/SETUP.sh: Auto merged Makefile.am: Auto merged configure.in: Auto merged BitKeeper/triggers/post-commit: merge include/Makefile.am: merge include/my_global.h: merge include/my_sys.h: merge libmysql/Makefile.shared: merge libmysqld/Makefile.am: merge mysql-test/mysql-test-run.pl: merge mysys/Makefile.am: merge mysys/mf_keycache.c: merge mysys/mf_keycaches.c: merge mysys/my_handler.c: merge mysys/my_init.c: merge mysys/my_open.c: merge mysys/my_pread.c: merge sql/Makefile.am: merge sql/handler.h: merge sql/item_func.cc: merge sql/item_func.h: merge sql/log.cc: merge sql/mysql_priv.h: merge sql/mysqld.cc: merge sql/set_var.cc: merge sql/sql_class.h: merge sql/sql_parse.cc: merge sql/sql_select.cc: merge sql/sql_test.cc: merge sql/unireg.cc: merge storage/csv/ha_tina.cc: merge storage/myisam/ft_boolean_search.c: merge storage/myisam/ha_myisam.cc: merge storage/myisam/ha_myisam.h: merge storage/myisam/mi_create.c: merge storage/myisam/mi_delete.c: merge storage/myisam/mi_dynrec.c: merge storage/myisam/mi_key.c: merge storage/myisam/mi_open.c: merge storage/myisam/mi_test2.c: merge storage/myisam/mi_unique.c: merge storage/myisam/mi_write.c: merge storage/myisam/myisamchk.c: merge storage/myisam/myisampack.c: merge storage/myisam/sort.c: merge unittest/mytap/tap.c: merge
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc38
1 files changed, 35 insertions, 3 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 2fe839189a0..c72fe6fd6fe 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -56,6 +56,9 @@
#include <thr_alarm.h>
#include <myisam.h>
#include <my_dir.h>
+#ifdef WITH_MARIA_STORAGE_ENGINE
+#include <maria.h>
+#endif
#include "events.h"
@@ -144,6 +147,7 @@ static void fix_max_join_size(THD *thd, enum_var_type type);
static void fix_query_cache_size(THD *thd, enum_var_type type);
static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type);
static void fix_myisam_max_sort_file_size(THD *thd, enum_var_type type);
+static void fix_maria_max_sort_file_size(THD *thd, enum_var_type type);
static void fix_max_binlog_size(THD *thd, enum_var_type type);
static void fix_max_relay_log_size(THD *thd, enum_var_type type);
static void fix_max_connections(THD *thd, enum_var_type type);
@@ -346,6 +350,14 @@ sys_var_thd_enum sys_myisam_stats_method("myisam_stats_method",
&myisam_stats_method_typelib,
NULL);
+sys_var_thd_ulonglong sys_maria_max_sort_file_size("maria_max_sort_file_size", &SV::maria_max_sort_file_size, fix_maria_max_sort_file_size, 1);
+sys_var_thd_ulong sys_maria_repair_threads("maria_repair_threads", &SV::maria_repair_threads);
+sys_var_thd_ulong sys_maria_sort_buffer_size("maria_sort_buffer_size", &SV::maria_sort_buff_size);
+sys_var_thd_enum sys_maria_stats_method("maria_stats_method",
+ &SV::maria_stats_method,
+ &myisam_stats_method_typelib,
+ NULL);
+
sys_var_thd_ulong sys_net_buffer_length("net_buffer_length",
&SV::net_buffer_length);
sys_var_thd_ulong sys_net_read_timeout("net_read_timeout",
@@ -867,6 +879,15 @@ SHOW_VAR init_vars[]= {
{sys_low_priority_updates.name, (char*) &sys_low_priority_updates, SHOW_SYS},
{"lower_case_file_system", (char*) &lower_case_file_system, SHOW_MY_BOOL},
{"lower_case_table_names", (char*) &lower_case_table_names, SHOW_INT},
+
+ {sys_maria_max_sort_file_size.name, (char*) &sys_maria_max_sort_file_size,
+ SHOW_SYS},
+ {sys_maria_repair_threads.name, (char*) &sys_maria_repair_threads,
+ SHOW_SYS},
+ {sys_maria_sort_buffer_size.name, (char*) &sys_maria_sort_buffer_size,
+ SHOW_SYS},
+ {sys_maria_stats_method.name, (char*) &sys_maria_stats_method, SHOW_SYS},
+
{sys_max_allowed_packet.name,(char*) &sys_max_allowed_packet, SHOW_SYS},
{sys_max_binlog_cache_size.name,(char*) &sys_max_binlog_cache_size, SHOW_SYS},
{sys_max_binlog_size.name, (char*) &sys_max_binlog_size, SHOW_SYS},
@@ -1011,10 +1032,10 @@ SHOW_VAR init_vars[]= {
#ifdef HAVE_THR_SETCONCURRENCY
{"thread_concurrency", (char*) &concurrency, SHOW_LONG},
#endif
- {"thread_stack", (char*) &thread_stack, SHOW_LONG},
+ {"thread_stack", (char*) &my_thread_stack_size, SHOW_LONG},
{sys_time_format.name, (char*) &sys_time_format, SHOW_SYS},
{"time_zone", (char*) &sys_time_zone, SHOW_SYS},
- {sys_timed_mutexes.name, (char*) &sys_timed_mutexes, SHOW_SYS},
+ {sys_timed_mutexes.name, (char*) &sys_timed_mutexes, SHOW_SYS},
{sys_tmp_table_size.name, (char*) &sys_tmp_table_size, SHOW_SYS},
{sys_tmpdir.name, (char*) &sys_tmpdir, SHOW_SYS},
{sys_trans_alloc_block_size.name, (char*) &sys_trans_alloc_block_size,
@@ -1157,6 +1178,16 @@ fix_myisam_max_sort_file_size(THD *thd, enum_var_type type)
(my_off_t) global_system_variables.myisam_max_sort_file_size;
}
+static void
+fix_maria_max_sort_file_size(THD *thd, enum_var_type type)
+{
+#ifdef WITH_MARIA_STORAGE_ENGINE
+ maria_max_temp_length=
+ (my_off_t) global_system_variables.myisam_max_sort_file_size;
+#endif
+}
+
+
/*
Set the OPTION_BIG_SELECTS flag if max_join_size == HA_POS_ERROR
*/
@@ -2363,6 +2394,7 @@ void sys_var_collation_server::set_default(THD *thd, enum_var_type type)
LEX_STRING default_key_cache_base= {(char *) "default", 7 };
+LEX_STRING maria_key_cache_base= {(char *) "maria", 5 };
static KEY_CACHE zero_key_cache;
@@ -2372,7 +2404,7 @@ KEY_CACHE *get_key_cache(LEX_STRING *cache_name)
if (!cache_name || ! cache_name->length)
cache_name= &default_key_cache_base;
return ((KEY_CACHE*) find_named(&key_caches,
- cache_name->str, cache_name->length, 0));
+ cache_name->str, cache_name->length, 0));
}