diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-05-12 18:50:59 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-05-12 18:50:59 -0400 |
commit | 6ae27e40985ef8c647ac2271c091f67511fb421f (patch) | |
tree | 08d1736de665cccf3fbd772e49ee45d307d5e1fd /sql | |
parent | c6c9a69ccee3325cfdd77d0dcd49259a574363b0 (diff) | |
parent | 014fe12c03a2fdcbd2eb6bab39118de1cee02693 (diff) | |
download | mariadb-git-6ae27e40985ef8c647ac2271c091f67511fb421f.tar.gz |
Merge branch '5.5-galera' into 10.0-galera
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 18 | ||||
-rw-r--r-- | sql/log.h | 8 | ||||
-rw-r--r-- | sql/sql_class.cc | 10 | ||||
-rw-r--r-- | sql/sql_parse.cc | 4 |
4 files changed, 24 insertions, 16 deletions
diff --git a/sql/log.cc b/sql/log.cc index ae932221f3b..12b6cf0483b 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -5954,11 +5954,23 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate) binlog_cache_data *cache_data= 0; bool is_trans_cache= FALSE; bool using_trans= event_info->use_trans_cache(); - bool direct= event_info->use_direct_logging(); + bool direct; ulong prev_binlog_id; DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)"); LINT_INIT(prev_binlog_id); +#ifdef WITH_WSREP + /* + When binary logging is not enabled (--log-bin=0), wsrep-patch partially + enables it without opening the binlog file (MSQL_BIN_LOG::open(). + So, avoid writing directly to binlog file. + */ + if (wsrep_emulate_bin_log) + direct= false; + else +#endif /* WITH_WSREP */ + direct= event_info->use_direct_logging(); + if (thd->variables.option_bits & OPTION_GTID_BEGIN) { DBUG_PRINT("info", ("OPTION_GTID_BEGIN was set")); @@ -6910,6 +6922,10 @@ MYSQL_BIN_LOG::write_transaction_to_binlog(THD *thd, DBUG_ENTER("MYSQL_BIN_LOG::write_transaction_to_binlog"); #ifdef WITH_WSREP + /* + Control should not be allowed beyond this point in wsrep_emulate_bin_log + mode. + */ if (wsrep_emulate_bin_log) DBUG_RETURN(0); #endif /* WITH_WSREP */ entry.thd= thd; diff --git a/sql/log.h b/sql/log.h index 46d38f3a770..c014e08b172 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1006,11 +1006,9 @@ uint purge_log_get_error_code(int res); int vprint_msg_to_log(enum loglevel level, const char *format, va_list args); void sql_print_error(const char *format, ...); -void sql_print_warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2); -void sql_print_information(const char *format, ...) - ATTRIBUTE_FORMAT(printf, 1, 2); -typedef void (*sql_print_message_func)(const char *format, ...) - ATTRIBUTE_FORMAT_FPTR(printf, 1, 2); +void sql_print_warning(const char *format, ...); +void sql_print_information(const char *format, ...); +typedef void (*sql_print_message_func)(const char *format, ...); extern sql_print_message_func sql_print_message_handlers[]; int error_log_print(enum loglevel level, const char *format, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ade63d0b436..bdd187279db 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -6605,16 +6605,6 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg, The MYSQL_LOG::write() function will set the STMT_END_F flag and flush the pending rows event if necessary. */ -#ifdef WITH_WSREP - /* - Even though wsrep only supports ROW binary log format, a user can set - binlog format to STATEMENT (wsrep_forced_binlog_format). In which case - the control might reach here even when binary logging (--log-bin) is - not enabled. This is possible because wsrep patch partially enables - binary logging by setting wsrep_emulate_binlog. - */ - if (mysql_bin_log.is_open()) -#endif /* WITH_WSREP */ { Query_log_event qinfo(this, query_arg, query_len, is_trans, direct, suppress_use, errcode); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0aff82b2eb5..1b50a21472f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -886,7 +886,11 @@ bool do_command(THD *thd) { bool return_value; char *packet= 0; +#ifdef WITH_WSREP + ulong packet_length= 0; // just to avoid (false positive) compiler warning +#else ulong packet_length; +#endif /* WITH_WSREP */ NET *net= &thd->net; enum enum_server_command command; DBUG_ENTER("do_command"); |