mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-12646: Apply fixes found by Coverity static analysis tool
Inspired by: https://github.com/devexp-db/mariadb/blob/f27/mariadb-covscan-stroverflow.patch
This commit is contained in:
committed by
Sergei Golubchik
parent
f9dbfa58a5
commit
172e3a1bc6
@ -552,7 +552,7 @@ int ReplSemiSyncMaster::reportReplyBinlog(uint32 server_id,
|
|||||||
|
|
||||||
if (need_copy_send_pos)
|
if (need_copy_send_pos)
|
||||||
{
|
{
|
||||||
strcpy(reply_file_name_, log_file_name);
|
strmake_buf(reply_file_name_, log_file_name);
|
||||||
reply_file_pos_ = log_file_pos;
|
reply_file_pos_ = log_file_pos;
|
||||||
reply_file_name_inited_ = true;
|
reply_file_name_inited_ = true;
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
|
|||||||
if (cmp <= 0)
|
if (cmp <= 0)
|
||||||
{
|
{
|
||||||
/* This thd has a lower position, let's update the minimum info. */
|
/* This thd has a lower position, let's update the minimum info. */
|
||||||
strcpy(wait_file_name_, trx_wait_binlog_name);
|
strmake_buf(wait_file_name_, trx_wait_binlog_name);
|
||||||
wait_file_pos_ = trx_wait_binlog_pos;
|
wait_file_pos_ = trx_wait_binlog_pos;
|
||||||
|
|
||||||
rpl_semi_sync_master_wait_pos_backtraverse++;
|
rpl_semi_sync_master_wait_pos_backtraverse++;
|
||||||
@ -670,7 +670,7 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(wait_file_name_, trx_wait_binlog_name);
|
strmake_buf(wait_file_name_, trx_wait_binlog_name);
|
||||||
wait_file_pos_ = trx_wait_binlog_pos;
|
wait_file_pos_ = trx_wait_binlog_pos;
|
||||||
wait_file_name_inited_ = true;
|
wait_file_name_inited_ = true;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ int Binlog_storage_delegate::after_flush(THD *thd,
|
|||||||
thd->semisync_info= log_info;
|
thd->semisync_info= log_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(log_info->log_file, log_file+dirname_length(log_file));
|
strmake_buf(log_info->log_file, log_file+dirname_length(log_file));
|
||||||
log_info->log_pos = log_pos;
|
log_info->log_pos = log_pos;
|
||||||
|
|
||||||
FOREACH_OBSERVER(ret, after_flush, false,
|
FOREACH_OBSERVER(ret, after_flush, false,
|
||||||
|
Reference in New Issue
Block a user