Commit 827a0d7c authored by Mats Kindahl's avatar Mats Kindahl

Merging with mysql-next-mr-bugfixing.

parents 12269253 f0a938c4
...@@ -235,6 +235,7 @@ typedef struct my_locale_errmsgs ...@@ -235,6 +235,7 @@ typedef struct my_locale_errmsgs
extern char err_shared_dir[]; extern char err_shared_dir[];
/** @note Keep this a POD-type because we use offsetof() on it */
typedef struct my_locale_st typedef struct my_locale_st
{ {
uint number; uint number;
......
...@@ -928,8 +928,6 @@ static bool add_terminator(DYNAMIC_ARRAY *options); ...@@ -928,8 +928,6 @@ static bool add_terminator(DYNAMIC_ARRAY *options);
extern "C" my_bool mysqld_get_one_option(int, const struct my_option *, char *); extern "C" my_bool mysqld_get_one_option(int, const struct my_option *, char *);
static void set_server_version(void); static void set_server_version(void);
static int init_thread_environment(); static int init_thread_environment();
static void init_error_log_mutex();
static void clean_up_error_log_mutex();
static char *get_relative_path(const char *path); static char *get_relative_path(const char *path);
static int fix_paths(void); static int fix_paths(void);
void handle_connections_sockets(); void handle_connections_sockets();
...@@ -1346,6 +1344,18 @@ extern "C" sig_handler print_signal_warning(int sig) ...@@ -1346,6 +1344,18 @@ extern "C" sig_handler print_signal_warning(int sig)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
static void init_error_log_mutex()
{
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
}
static void clean_up_error_log_mutex()
{
mysql_mutex_destroy(&LOCK_error_log);
}
/** /**
cleanup all memory and end program nicely. cleanup all memory and end program nicely.
...@@ -3360,7 +3370,7 @@ static int init_common_variables() ...@@ -3360,7 +3370,7 @@ static int init_common_variables()
set the def_value member to 0 in my_long_options and initialize it set the def_value member to 0 in my_long_options and initialize it
to the correct value here. to the correct value here.
*/ */
default_storage_engine="MyISAM"; default_storage_engine= const_cast<char *>("MyISAM");
/* /*
Add server status variables to the dynamic list of Add server status variables to the dynamic list of
...@@ -3701,15 +3711,6 @@ You should consider changing lower_case_table_names to 1 or 2", ...@@ -3701,15 +3711,6 @@ You should consider changing lower_case_table_names to 1 or 2",
return 0; return 0;
} }
static void init_error_log_mutex()
{
mysql_mutex_init(key_LOCK_error_log, &LOCK_error_log, MY_MUTEX_INIT_FAST);
}
static void clean_up_error_log_mutex()
{
mysql_mutex_destroy(&LOCK_error_log);
}
static int init_thread_environment() static int init_thread_environment()
{ {
......
...@@ -4378,7 +4378,7 @@ best_access_path(JOIN *join, ...@@ -4378,7 +4378,7 @@ best_access_path(JOIN *join,
*/ */
if (table->quick_keys.is_set(key) && if (table->quick_keys.is_set(key) &&
(const_part & ((1 << table->quick_key_parts[key])-1)) == (const_part & ((1 << table->quick_key_parts[key])-1)) ==
((1 << table->quick_key_parts[key])-1) && (((key_part_map)1 << table->quick_key_parts[key])-1) &&
table->quick_n_ranges[key] == 1 && table->quick_n_ranges[key] == 1 &&
records > (double) table->quick_rows[key]) records > (double) table->quick_rows[key])
{ {
......
...@@ -9218,8 +9218,8 @@ table_factor: ...@@ -9218,8 +9218,8 @@ table_factor:
lex->pop_context(); lex->pop_context();
lex->nest_level--; lex->nest_level--;
} }
else if ($3->select_lex && else if (($3->select_lex &&
$3->select_lex->master_unit()->is_union() || $5) $3->select_lex->master_unit()->is_union()) || $5)
{ {
/* simple nested joins cannot have aliases or unions */ /* simple nested joins cannot have aliases or unions */
my_parse_error(ER(ER_SYNTAX_ERROR)); my_parse_error(ER(ER_SYNTAX_ERROR));
......
...@@ -2956,14 +2956,14 @@ static bool check_locale(sys_var *self, THD *thd, set_var *var) ...@@ -2956,14 +2956,14 @@ static bool check_locale(sys_var *self, THD *thd, set_var *var)
static Sys_var_struct Sys_lc_messages( static Sys_var_struct Sys_lc_messages(
"lc_messages", "Set the language used for the error messages", "lc_messages", "Set the language used for the error messages",
SESSION_VAR(lc_messages), NO_CMD_LINE, SESSION_VAR(lc_messages), NO_CMD_LINE,
offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages), my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale)); NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale));
static Sys_var_struct Sys_lc_time_names( static Sys_var_struct Sys_lc_time_names(
"lc_time_names", "Set the language used for the month " "lc_time_names", "Set the language used for the month "
"names and the days of the week", "names and the days of the week",
SESSION_VAR(lc_time_names), NO_CMD_LINE, SESSION_VAR(lc_time_names), NO_CMD_LINE,
offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names), my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale)); NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale));
static Sys_var_tz Sys_time_zone( static Sys_var_tz Sys_time_zone(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment