mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#17508351: REDUNDANT CODE IN REPLSEMISYNCMASTER::UPDATESYNCHEADER
ReplSemiSyncMaster::updateSyncHeader contains redundant assignments to the local variable sync. This patch removes them.
This commit is contained in:
@ -894,10 +894,7 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
|
|||||||
* target, do not request replies from the slave.
|
* target, do not request replies from the slave.
|
||||||
*/
|
*/
|
||||||
if (!getMasterEnabled() || !is_semi_sync_slave())
|
if (!getMasterEnabled() || !is_semi_sync_slave())
|
||||||
{
|
|
||||||
sync = false;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
function_enter(kWho);
|
function_enter(kWho);
|
||||||
|
|
||||||
@ -905,15 +902,12 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
|
|||||||
|
|
||||||
/* This is the real check inside the mutex. */
|
/* This is the real check inside the mutex. */
|
||||||
if (!getMasterEnabled())
|
if (!getMasterEnabled())
|
||||||
{
|
goto l_end; // sync= false at this point in time
|
||||||
sync = false;
|
|
||||||
goto l_end;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_on())
|
if (is_on())
|
||||||
{
|
{
|
||||||
/* semi-sync is ON */
|
/* semi-sync is ON */
|
||||||
sync = false; /* No sync unless a transaction is involved. */
|
/* sync= false; No sync unless a transaction is involved. */
|
||||||
|
|
||||||
if (reply_file_name_inited_)
|
if (reply_file_name_inited_)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user