Commit 51af6729 authored by Mats Kindahl's avatar Mats Kindahl

Patch to eliminate warnings in mysql-next-mr-bugteam.

parent 8976595d
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64) #define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
uint rpl_status=RPL_NULL; RPL_STATUS rpl_status=RPL_NULL;
mysql_mutex_t LOCK_rpl_status; mysql_mutex_t LOCK_rpl_status;
mysql_cond_t COND_rpl_status; mysql_cond_t COND_rpl_status;
HASH slave_list; HASH slave_list;
......
...@@ -26,7 +26,7 @@ typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE, ...@@ -26,7 +26,7 @@ typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER, RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */, RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS; RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
extern uint rpl_status; extern RPL_STATUS rpl_status;
extern mysql_mutex_t LOCK_rpl_status; extern mysql_mutex_t LOCK_rpl_status;
extern mysql_cond_t COND_rpl_status; extern mysql_cond_t COND_rpl_status;
......
...@@ -112,8 +112,8 @@ int injector::transaction::write_row (server_id_type sid, table tbl, ...@@ -112,8 +112,8 @@ int injector::transaction::write_row (server_id_type sid, table tbl,
{ {
DBUG_ENTER("injector::transaction::write_row(...)"); DBUG_ENTER("injector::transaction::write_row(...)");
int error= 0; int error= check_state(ROW_STATE);
if (error= check_state(ROW_STATE)) if (error)
DBUG_RETURN(error); DBUG_RETURN(error);
server_id_type save_id= m_thd->server_id; server_id_type save_id= m_thd->server_id;
...@@ -131,8 +131,8 @@ int injector::transaction::delete_row(server_id_type sid, table tbl, ...@@ -131,8 +131,8 @@ int injector::transaction::delete_row(server_id_type sid, table tbl,
{ {
DBUG_ENTER("injector::transaction::delete_row(...)"); DBUG_ENTER("injector::transaction::delete_row(...)");
int error= 0; int error= check_state(ROW_STATE);
if (error= check_state(ROW_STATE)) if (error)
DBUG_RETURN(error); DBUG_RETURN(error);
server_id_type save_id= m_thd->server_id; server_id_type save_id= m_thd->server_id;
...@@ -150,8 +150,8 @@ int injector::transaction::update_row(server_id_type sid, table tbl, ...@@ -150,8 +150,8 @@ int injector::transaction::update_row(server_id_type sid, table tbl,
{ {
DBUG_ENTER("injector::transaction::update_row(...)"); DBUG_ENTER("injector::transaction::update_row(...)");
int error= 0; int error= check_state(ROW_STATE);
if (error= check_state(ROW_STATE)) if (error)
DBUG_RETURN(error); DBUG_RETURN(error);
server_id_type save_id= m_thd->server_id; server_id_type save_id= m_thd->server_id;
......
...@@ -33,8 +33,8 @@ int init_dynarray_intvar_from_file(DYNAMIC_ARRAY* arr, IO_CACHE* f); ...@@ -33,8 +33,8 @@ int init_dynarray_intvar_from_file(DYNAMIC_ARRAY* arr, IO_CACHE* f);
Master_info::Master_info(bool is_slave_recovery) Master_info::Master_info(bool is_slave_recovery)
:Slave_reporting_capability("I/O"), :Slave_reporting_capability("I/O"),
ssl(0), ssl_verify_server_cert(0), fd(-1), io_thd(0), ssl(0), ssl_verify_server_cert(0), fd(-1), io_thd(0),
port(MYSQL_PORT), connect_retry(DEFAULT_CONNECT_RETRY), inited(0), rli(is_slave_recovery), port(MYSQL_PORT),
rli(is_slave_recovery), abort_slave(0), connect_retry(DEFAULT_CONNECT_RETRY), inited(0), abort_slave(0),
slave_running(0), slave_run_id(0), sync_counter(0), slave_running(0), slave_run_id(0), sync_counter(0),
heartbeat_period(0), received_heartbeats(0), master_id(0) heartbeat_period(0), received_heartbeats(0), master_id(0)
{ {
......
...@@ -1111,7 +1111,7 @@ int init_dynarray_intvar_from_file(DYNAMIC_ARRAY* arr, IO_CACHE* f) ...@@ -1111,7 +1111,7 @@ int init_dynarray_intvar_from_file(DYNAMIC_ARRAY* arr, IO_CACHE* f)
memcpy(buf_act, buf, read_size); memcpy(buf_act, buf, read_size);
snd_size= my_b_gets(f, buf_act + read_size, max_size - read_size); snd_size= my_b_gets(f, buf_act + read_size, max_size - read_size);
if (snd_size == 0 || if (snd_size == 0 ||
(snd_size + 1 == max_size - read_size) && buf[max_size - 2] != '\n') ((snd_size + 1 == max_size - read_size) && buf[max_size - 2] != '\n'))
{ {
/* /*
failure to make the 2nd read or short read again failure to make the 2nd read or short read again
...@@ -3943,8 +3943,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) ...@@ -3943,8 +3943,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
/* everything is filtered out from non-master */ /* everything is filtered out from non-master */
(s_id != mi->master_id || (s_id != mi->master_id ||
/* for the master meta information is necessary */ /* for the master meta information is necessary */
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT && (buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT))) buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT))))
{ {
/* /*
Do not write it to the relay log. Do not write it to the relay log.
...@@ -3964,9 +3964,9 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) ...@@ -3964,9 +3964,9 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
as well as rli->group_relay_log_pos. as well as rli->group_relay_log_pos.
*/ */
if (!(s_id == ::server_id && !mi->rli.replicate_same_server_id) || if (!(s_id == ::server_id && !mi->rli.replicate_same_server_id) ||
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT && (buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT && buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT &&
buf[EVENT_TYPE_OFFSET] != STOP_EVENT) buf[EVENT_TYPE_OFFSET] != STOP_EVENT))
{ {
mi->master_log_pos+= inc_pos; mi->master_log_pos+= inc_pos;
memcpy(rli->ign_master_log_name_end, mi->master_log_name, FN_REFLEN); memcpy(rli->ign_master_log_name_end, mi->master_log_name, FN_REFLEN);
......
...@@ -3531,7 +3531,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) ...@@ -3531,7 +3531,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
{ {
DBUG_ENTER("THD::decide_logging_format"); DBUG_ENTER("THD::decide_logging_format");
DBUG_PRINT("info", ("query: %s", query())); DBUG_PRINT("info", ("query: %s", query()));
DBUG_PRINT("info", ("variables.binlog_format: %ld", DBUG_PRINT("info", ("variables.binlog_format: %u",
variables.binlog_format)); variables.binlog_format));
DBUG_PRINT("info", ("lex->get_stmt_unsafe_flags(): 0x%x", DBUG_PRINT("info", ("lex->get_stmt_unsafe_flags(): 0x%x",
lex->get_stmt_unsafe_flags())); lex->get_stmt_unsafe_flags()));
...@@ -3672,7 +3672,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) ...@@ -3672,7 +3672,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
lock history on the slave will be different from the master. lock history on the slave will be different from the master.
*/ */
if (mixed_engine || if (mixed_engine ||
trans_has_updated_trans_table(this) && !all_trans_engines) (trans_has_updated_trans_table(this) && !all_trans_engines))
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS); lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS);
DBUG_PRINT("info", ("flags_all_set: 0x%llx", flags_all_set)); DBUG_PRINT("info", ("flags_all_set: 0x%llx", flags_all_set));
...@@ -3802,7 +3802,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) ...@@ -3802,7 +3802,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
DBUG_PRINT("info", ("decision: no logging since " DBUG_PRINT("info", ("decision: no logging since "
"mysql_bin_log.is_open() = %d " "mysql_bin_log.is_open() = %d "
"and (options & OPTION_BIN_LOG) = 0x%llx " "and (options & OPTION_BIN_LOG) = 0x%llx "
"and binlog_format = %ld " "and binlog_format = %u "
"and binlog_filter->db_ok(db) = %d", "and binlog_filter->db_ok(db) = %d",
mysql_bin_log.is_open(), mysql_bin_log.is_open(),
(variables.option_bits & OPTION_BIN_LOG), (variables.option_bits & OPTION_BIN_LOG),
......
...@@ -854,7 +854,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) ...@@ -854,7 +854,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
qinfo.db_len = strlen(db); qinfo.db_len = strlen(db);
/* These DDL methods and logging protected with LOCK_mysql_create_db */ /* These DDL methods and logging protected with LOCK_mysql_create_db */
if (error= mysql_bin_log.write(&qinfo)) if ((error= mysql_bin_log.write(&qinfo)))
goto exit; goto exit;
} }
my_ok(thd, result); my_ok(thd, result);
......
...@@ -3887,7 +3887,7 @@ end_with_restore_list: ...@@ -3887,7 +3887,7 @@ end_with_restore_list:
*/ */
if (!lex->no_write_to_binlog && write_to_binlog) if (!lex->no_write_to_binlog && write_to_binlog)
{ {
if (res= write_bin_log(thd, FALSE, thd->query(), thd->query_length())) if ((res= write_bin_log(thd, FALSE, thd->query(), thd->query_length())))
break; break;
} }
my_ok(thd); my_ok(thd);
......
...@@ -828,11 +828,11 @@ impossible position"; ...@@ -828,11 +828,11 @@ impossible position";
{ {
if (coord) if (coord)
{ {
DBUG_ASSERT(heartbeat_ts && heartbeat_period != LL(0)); DBUG_ASSERT(heartbeat_ts && heartbeat_period != 0);
set_timespec_nsec(*heartbeat_ts, heartbeat_period); set_timespec_nsec(*heartbeat_ts, heartbeat_period);
} }
ret= mysql_bin_log.wait_for_update_bin_log(thd, heartbeat_ts); ret= mysql_bin_log.wait_for_update_bin_log(thd, heartbeat_ts);
DBUG_ASSERT(ret == 0 || heartbeat_period != LL(0) && coord != NULL); DBUG_ASSERT(ret == 0 || (heartbeat_period != 0 && coord != NULL));
if (ret == ETIMEDOUT || ret == ETIME) if (ret == ETIMEDOUT || ret == ETIME)
{ {
#ifndef DBUG_OFF #ifndef DBUG_OFF
......
...@@ -6533,7 +6533,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -6533,7 +6533,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
thd->clear_error(); thd->clear_error();
Query_log_event qinfo(thd, thd->query(), thd->query_length(), Query_log_event qinfo(thd, thd->query(), thd->query_length(),
FALSE, TRUE, FALSE, 0); FALSE, TRUE, FALSE, 0);
if (error= mysql_bin_log.write(&qinfo)) if ((error= mysql_bin_log.write(&qinfo)))
goto view_err_unlock; goto view_err_unlock;
} }
my_ok(thd); my_ok(thd);
......
...@@ -324,7 +324,7 @@ static bool binlog_direct_check(sys_var *self, THD *thd, set_var *var) ...@@ -324,7 +324,7 @@ static bool binlog_direct_check(sys_var *self, THD *thd, set_var *var)
return true; return true;
if (var->type == OPT_GLOBAL || if (var->type == OPT_GLOBAL ||
(thd->variables.binlog_direct_non_trans_update == (thd->variables.binlog_direct_non_trans_update ==
var->save_result.ulonglong_value)) static_cast<my_bool>(var->save_result.ulonglong_value)))
return false; return false;
return false; return false;
......
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