Skip to content

Commit

Permalink
Merge branch '5.5-galera' into 10.0-galera
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirbhay Choubey committed May 12, 2015
2 parents c6c9a69 + 014fe12 commit 6ae27e4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 17 deletions.
1 change: 0 additions & 1 deletion mysql-test/suite/percona/innodb_sys_index.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ SELECT COUNT(*) FROM `information_schema`.`INNODB_SYS_INDEXES` ;
drop table test.t1;
SHOW TABLE STATUS FROM `information_schema` LIKE 'INNODB\_SYS\_INDEXES%' ;
--enable_result_log

26 changes: 26 additions & 0 deletions scripts/wsrep_sst_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,32 @@ else
MY_PRINT_DEFAULTS=$(which my_print_defaults)
fi

# try to use my_print_defaults, mysql and mysqldump that come with the sources
# (for MTR suite)
SCRIPTS_DIR="$(cd $(dirname "$0"); pwd -P)"
EXTRA_DIR="$SCRIPTS_DIR/../extra"
CLIENT_DIR="$SCRIPTS_DIR/../client"

if [ -x "$CLIENT_DIR/mysql" ]; then
MYSQL_CLIENT="$CLIENT_DIR/mysql"
else
MYSQL_CLIENT=$(which mysql)
fi

if [ -x "$CLIENT_DIR/mysqldump" ]; then
MYSQLDUMP="$CLIENT_DIR/mysqldump"
else
MYSQLDUMP=$(which mysqldump)
fi

if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then
MY_PRINT_DEFAULTS="$SCRIPTS_DIR/my_print_defaults"
elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then
MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults"
else
MY_PRINT_DEFAULTS=$(which my_print_defaults)
fi

# For Bug:1200727
if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth";then
if [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ];then
Expand Down
18 changes: 17 additions & 1 deletion sql/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 3 additions & 5 deletions sql/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 0 additions & 10 deletions sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 6ae27e4

Please sign in to comment.