summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2010-11-18 15:01:50 +0300
committerRamil Kalimullin <ramil@mysql.com>2010-11-18 15:01:50 +0300
commit2b2983850f4711effca876baa3f926a7072a4fb8 (patch)
tree04b3b89fdd9cd8129c671253e6d65fe9be72ded2 /sql/mysqld.cc
parentabdaf1f79b07914ba31ef06a51927345526c92e0 (diff)
parent3f391adc78e1dd91bb2c3638175f251f25d1b433 (diff)
downloadmariadb-git-2b2983850f4711effca876baa3f926a7072a4fb8.tar.gz
Manual-merge from 5.5-bugfixing.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc29
1 files changed, 22 insertions, 7 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 99754e8b7f6..04e61635f22 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3778,12 +3778,12 @@ static int init_server_components()
unireg_abort(1);
}
- /* initialize delegates for extension observers */
+ /*
+ initialize delegates for extension observers, errors have already
+ been reported in the function
+ */
if (delegates_init())
- {
- sql_print_error("Initialize extension delegates failed");
unireg_abort(1);
- }
/* need to configure logging before initializing storage engines */
if (opt_log_slave_updates && !opt_bin_log)
@@ -4949,7 +4949,7 @@ void create_thread_to_handle_connection(THD *thd)
statistic_increment(aborted_connects,&LOCK_status);
/* Can't use my_error() since store_globals has not been called. */
my_snprintf(error_message_buff, sizeof(error_message_buff),
- ER(ER_CANT_CREATE_THREAD), error);
+ ER_THD(thd, ER_CANT_CREATE_THREAD), error);
net_send_error(thd, ER_CANT_CREATE_THREAD, error_message_buff, NULL);
mysql_mutex_lock(&LOCK_thread_count);
close_connection(thd,0,0);
@@ -5662,6 +5662,12 @@ struct my_option my_long_options[]=
{"ansi", 'a', "Use ANSI SQL syntax instead of MySQL syntax. This mode "
"will also set transaction isolation level 'serializable'.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ /*
+ Because Sys_var_bit does not support command-line options, we need to
+ explicitely add one for --autocommit
+ */
+ {"autocommit", OPT_AUTOCOMMIT, "Set default value for autocommit (0 or 1)",
+ NULL, NULL, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, NULL},
{"bind-address", OPT_BIND_ADDRESS, "IP address to bind to.",
&my_bind_addr_str, &my_bind_addr_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -7114,6 +7120,13 @@ mysqld_get_one_option(int optid,
if (argument == NULL) /* no argument */
log_error_file_ptr= const_cast<char*>("");
break;
+ case OPT_AUTOCOMMIT:
+ const ulonglong turn_bit_on= (argument && (atoi(argument) == 0)) ?
+ OPTION_NOT_AUTOCOMMIT : OPTION_AUTOCOMMIT;
+ global_system_variables.option_bits=
+ (global_system_variables.option_bits &
+ ~(OPTION_NOT_AUTOCOMMIT | OPTION_AUTOCOMMIT)) | turn_bit_on;
+ break;
}
return 0;
}
@@ -7825,9 +7838,10 @@ PSI_file_key key_file_binlog, key_file_binlog_index, key_file_casetest,
key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file,
key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load,
key_file_loadfile, key_file_log_event_data, key_file_log_event_info,
- key_file_master_info, key_file_misc, key_file_MYSQL_LOG, key_file_partition,
+ key_file_master_info, key_file_misc, key_file_partition,
key_file_pid, key_file_relay_log_info, key_file_send_file, key_file_tclog,
key_file_trg, key_file_trn, key_file_init;
+PSI_file_key key_file_query_log, key_file_slow_log;
static PSI_file_info all_server_files[]=
{
@@ -7850,11 +7864,12 @@ static PSI_file_info all_server_files[]=
{ &key_file_log_event_info, "log_event_info", 0},
{ &key_file_master_info, "master_info", 0},
{ &key_file_misc, "misc", 0},
- { &key_file_MYSQL_LOG, "MYSQL_LOG", 0},
{ &key_file_partition, "partition", 0},
{ &key_file_pid, "pid", 0},
+ { &key_file_query_log, "query_log", 0},
{ &key_file_relay_log_info, "relay_log_info", 0},
{ &key_file_send_file, "send_file", 0},
+ { &key_file_slow_log, "slow_log", 0},
{ &key_file_tclog, "tclog", 0},
{ &key_file_trg, "trigger_name", 0},
{ &key_file_trn, "trigger", 0},