mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 22:25:32 +02:00
Merge bodhi.local:/opt/local/work/tmp_merge
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41 BitKeeper/etc/ignore: auto-union libmysqld/Makefile.am: Auto merged myisam/mi_create.c: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/t/date_formats.test: Auto merged sql/Makefile.am: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/sql_class.h: Auto merged support-files/mysql.spec.sh: Auto merged mysql-test/r/myisam.result: Manual merge. mysql-test/t/myisam.test: Manual merge. sql/set_var.cc: Manual merge. sql/set_var.h: Manual merge. sql/sql_cache.cc: Manual merge. sql/sql_class.cc: Manual merge.
This commit is contained in:
commit
60b7f9d645
16 changed files with 1855 additions and 48 deletions
|
|
@ -58,6 +58,7 @@
|
|||
#include <my_getopt.h>
|
||||
#include <thr_alarm.h>
|
||||
#include <myisam.h>
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB
|
||||
#include "ha_berkeley.h"
|
||||
#endif
|
||||
|
|
@ -553,6 +554,9 @@ static sys_var_thd_ha_rows sys_select_limit("sql_select_limit",
|
|||
static sys_var_timestamp sys_timestamp("timestamp");
|
||||
static sys_var_last_insert_id sys_last_insert_id("last_insert_id");
|
||||
static sys_var_last_insert_id sys_identity("identity");
|
||||
|
||||
static sys_var_thd_lc_time_names sys_lc_time_names("lc_time_names");
|
||||
|
||||
static sys_var_insert_id sys_insert_id("insert_id");
|
||||
static sys_var_readonly sys_error_count("error_count",
|
||||
OPT_SESSION,
|
||||
|
|
@ -651,6 +655,7 @@ sys_var *sys_variables[]=
|
|||
&sys_key_cache_division_limit,
|
||||
&sys_key_cache_age_threshold,
|
||||
&sys_last_insert_id,
|
||||
&sys_lc_time_names,
|
||||
&sys_license,
|
||||
&sys_local_infile,
|
||||
&sys_log_binlog,
|
||||
|
|
@ -921,6 +926,7 @@ struct show_var_st init_vars[]= {
|
|||
{"large_files_support", (char*) &opt_large_files, SHOW_BOOL},
|
||||
{"large_page_size", (char*) &opt_large_page_size, SHOW_INT},
|
||||
{"large_pages", (char*) &opt_large_pages, SHOW_MY_BOOL},
|
||||
{sys_lc_time_names.name, (char*) &sys_lc_time_names, SHOW_SYS},
|
||||
{sys_license.name, (char*) &sys_license, SHOW_SYS},
|
||||
{sys_local_infile.name, (char*) &sys_local_infile, SHOW_SYS},
|
||||
#ifdef HAVE_MLOCKALL
|
||||
|
|
@ -2764,6 +2770,40 @@ byte *sys_var_max_user_conn::value_ptr(THD *thd, enum_var_type type,
|
|||
return (byte*) &(max_user_connections);
|
||||
}
|
||||
|
||||
bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var)
|
||||
{
|
||||
char *locale_str =var->value->str_value.c_ptr();
|
||||
MY_LOCALE *locale_match= my_locale_by_name(locale_str);
|
||||
|
||||
if (locale_match == NULL)
|
||||
{
|
||||
my_printf_error(ER_UNKNOWN_ERROR,
|
||||
"Unknown locale: '%s'", MYF(0), locale_str);
|
||||
return 1;
|
||||
}
|
||||
var->save_result.locale_value= locale_match;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool sys_var_thd_lc_time_names::update(THD *thd, set_var *var)
|
||||
{
|
||||
thd->variables.lc_time_names= var->save_result.locale_value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
byte *sys_var_thd_lc_time_names::value_ptr(THD *thd, enum_var_type type,
|
||||
LEX_STRING *base)
|
||||
{
|
||||
return (byte *)(thd->variables.lc_time_names->name);
|
||||
}
|
||||
|
||||
|
||||
void sys_var_thd_lc_time_names::set_default(THD *thd, enum_var_type type)
|
||||
{
|
||||
thd->variables.lc_time_names = &my_locale_en_US;
|
||||
}
|
||||
|
||||
/*
|
||||
Functions to update thd->options bits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue