Commit 6ae27e40 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Merge branch '5.5-galera' into 10.0-galera

parents c6c9a69c 014fe12c
......@@ -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
......@@ -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
......
......@@ -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;
......
......@@ -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,
......
......@@ -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);
......
......@@ -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");
......
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