mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
Patch to eliminate warnings in mysql-next-mr-bugteam.
This commit is contained in:
parent
0e5fa89e4f
commit
e34eb3b507
11 changed files with 25 additions and 25 deletions
|
@ -38,7 +38,7 @@
|
|||
#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_cond_t COND_rpl_status;
|
||||
HASH slave_list;
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
|
|||
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
|
||||
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
|
||||
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_cond_t COND_rpl_status;
|
||||
|
|
|
@ -112,8 +112,8 @@ int injector::transaction::write_row (server_id_type sid, table tbl,
|
|||
{
|
||||
DBUG_ENTER("injector::transaction::write_row(...)");
|
||||
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
int error= check_state(ROW_STATE);
|
||||
if (error)
|
||||
DBUG_RETURN(error);
|
||||
|
||||
server_id_type save_id= m_thd->server_id;
|
||||
|
@ -131,8 +131,8 @@ int injector::transaction::delete_row(server_id_type sid, table tbl,
|
|||
{
|
||||
DBUG_ENTER("injector::transaction::delete_row(...)");
|
||||
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
int error= check_state(ROW_STATE);
|
||||
if (error)
|
||||
DBUG_RETURN(error);
|
||||
|
||||
server_id_type save_id= m_thd->server_id;
|
||||
|
@ -150,8 +150,8 @@ int injector::transaction::update_row(server_id_type sid, table tbl,
|
|||
{
|
||||
DBUG_ENTER("injector::transaction::update_row(...)");
|
||||
|
||||
int error= 0;
|
||||
if (error= check_state(ROW_STATE))
|
||||
int error= check_state(ROW_STATE);
|
||||
if (error)
|
||||
DBUG_RETURN(error);
|
||||
|
||||
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);
|
|||
Master_info::Master_info(bool is_slave_recovery)
|
||||
:Slave_reporting_capability("I/O"),
|
||||
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), abort_slave(0),
|
||||
rli(is_slave_recovery), port(MYSQL_PORT),
|
||||
connect_retry(DEFAULT_CONNECT_RETRY), inited(0), abort_slave(0),
|
||||
slave_running(0), slave_run_id(0), sync_counter(0),
|
||||
heartbeat_period(0), received_heartbeats(0), master_id(0)
|
||||
{
|
||||
|
|
12
sql/slave.cc
12
sql/slave.cc
|
@ -1111,7 +1111,7 @@ int init_dynarray_intvar_from_file(DYNAMIC_ARRAY* arr, IO_CACHE* f)
|
|||
memcpy(buf_act, buf, read_size);
|
||||
snd_size= my_b_gets(f, buf_act + read_size, max_size - read_size);
|
||||
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
|
||||
|
@ -3943,8 +3943,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
|
|||
/* everything is filtered out from non-master */
|
||||
(s_id != mi->master_id ||
|
||||
/* for the master meta information is necessary */
|
||||
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT)))
|
||||
(buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT))))
|
||||
{
|
||||
/*
|
||||
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)
|
|||
as well as rli->group_relay_log_pos.
|
||||
*/
|
||||
if (!(s_id == ::server_id && !mi->rli.replicate_same_server_id) ||
|
||||
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != STOP_EVENT)
|
||||
(buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != ROTATE_EVENT &&
|
||||
buf[EVENT_TYPE_OFFSET] != STOP_EVENT))
|
||||
{
|
||||
mi->master_log_pos+= inc_pos;
|
||||
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)
|
|||
{
|
||||
DBUG_ENTER("THD::decide_logging_format");
|
||||
DBUG_PRINT("info", ("query: %s", query()));
|
||||
DBUG_PRINT("info", ("variables.binlog_format: %ld",
|
||||
DBUG_PRINT("info", ("variables.binlog_format: %u",
|
||||
variables.binlog_format));
|
||||
DBUG_PRINT("info", ("lex->get_stmt_unsafe_flags(): 0x%x",
|
||||
lex->get_stmt_unsafe_flags()));
|
||||
|
@ -3672,7 +3672,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
|
|||
lock history on the slave will be different from the master.
|
||||
*/
|
||||
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);
|
||||
|
||||
DBUG_PRINT("info", ("flags_all_set: 0x%llx", flags_all_set));
|
||||
|
@ -3802,7 +3802,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
|
|||
DBUG_PRINT("info", ("decision: no logging since "
|
||||
"mysql_bin_log.is_open() = %d "
|
||||
"and (options & OPTION_BIN_LOG) = 0x%llx "
|
||||
"and binlog_format = %ld "
|
||||
"and binlog_format = %u "
|
||||
"and binlog_filter->db_ok(db) = %d",
|
||||
mysql_bin_log.is_open(),
|
||||
(variables.option_bits & OPTION_BIN_LOG),
|
||||
|
|
|
@ -854,7 +854,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
|
|||
qinfo.db_len = strlen(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;
|
||||
}
|
||||
my_ok(thd, result);
|
||||
|
|
|
@ -3887,7 +3887,7 @@ end_with_restore_list:
|
|||
*/
|
||||
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;
|
||||
}
|
||||
my_ok(thd);
|
||||
|
|
|
@ -828,11 +828,11 @@ impossible position";
|
|||
{
|
||||
if (coord)
|
||||
{
|
||||
DBUG_ASSERT(heartbeat_ts && heartbeat_period != LL(0));
|
||||
DBUG_ASSERT(heartbeat_ts && heartbeat_period != 0);
|
||||
set_timespec_nsec(*heartbeat_ts, heartbeat_period);
|
||||
}
|
||||
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)
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
|
|
|
@ -6533,7 +6533,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||
thd->clear_error();
|
||||
Query_log_event qinfo(thd, thd->query(), thd->query_length(),
|
||||
FALSE, TRUE, FALSE, 0);
|
||||
if (error= mysql_bin_log.write(&qinfo))
|
||||
if ((error= mysql_bin_log.write(&qinfo)))
|
||||
goto view_err_unlock;
|
||||
}
|
||||
my_ok(thd);
|
||||
|
|
|
@ -324,7 +324,7 @@ static bool binlog_direct_check(sys_var *self, THD *thd, set_var *var)
|
|||
return true;
|
||||
if (var->type == OPT_GLOBAL ||
|
||||
(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;
|
||||
|
|
Loading…
Add table
Reference in a new issue