1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-25 17:25:02 +03:00

5.5 merge

This commit is contained in:
Sergei Golubchik
2014-02-01 00:54:03 +01:00
304 changed files with 12473 additions and 942 deletions

View File

@@ -479,13 +479,17 @@ void ReplSemiSyncMaster::remove_slave()
lock();
rpl_semi_sync_master_clients--;
/* If user has chosen not to wait if no semi-sync slave available
and the last semi-sync slave exits, turn off semi-sync on master
immediately.
*/
if (!rpl_semi_sync_master_wait_no_slave &&
rpl_semi_sync_master_clients == 0)
switch_off();
/* Only switch off if semi-sync is enabled and is on */
if (getMasterEnabled() && is_on())
{
/* If user has chosen not to wait if no semi-sync slave available
and the last semi-sync slave exits, turn off semi-sync on master
immediately.
*/
if (!rpl_semi_sync_master_wait_no_slave &&
rpl_semi_sync_master_clients == 0)
switch_off();
}
unlock();
}
@@ -884,10 +888,7 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
* target, do not request replies from the slave.
*/
if (!getMasterEnabled() || !is_semi_sync_slave())
{
sync = false;
return 0;
}
function_enter(kWho);
@@ -895,15 +896,12 @@ int ReplSemiSyncMaster::updateSyncHeader(unsigned char *packet,
/* This is the real check inside the mutex. */
if (!getMasterEnabled())
{
sync = false;
goto l_end;
}
goto l_end; // sync= false at this point in time
if (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_)
{