diff options
author | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2013-09-23 12:13:37 +0530 |
---|---|---|
committer | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2013-09-23 12:13:37 +0530 |
commit | cc4043f013ba796050ba1a971e5806d3bc0ca572 (patch) | |
tree | 67eb915381474b92891d3c56f4921d6eb835a211 /plugin/semisync | |
parent | 1e96a26a762923b9df6a36d1d58e936abeb1f4e2 (diff) | |
download | mariadb-git-cc4043f013ba796050ba1a971e5806d3bc0ca572.tar.gz |
Bug#17327454:SEMI-SYNC REPLICATION MASTER CRASH WHEN SET
RPL_SEMI_SYNC_MASTER_ENABLED OFF.
Problem:
=======
If master is waiting for a reply from slave, at this time
set global rpl_semi_sync_master_enabled=OFF, the master
server will crash.
Analysis:
========
When master is waiting for a reply from slave, at this time
if semi sync is switched off on master, during switch off if
active transactions are present the transactions will be
cleared and "active_tranxs_" variable will be set to NULL.
When the waiting master connection finds that semi sync is
switched of it tries to access "active_tranxs_" without
checking if the transaction list exists or not. Accessing
NULL transaction list causes the crash.
Fix:
===
A check has been added to see a valid list exists before
accessing the "active_tranxs_".
plugin/semisync/semisync_master.cc:
Added check for the existence of valid 'active_transx_'.
Diffstat (limited to 'plugin/semisync')
-rw-r--r-- | plugin/semisync/semisync_master.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 1be876d0f1b..87adbdcae79 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -752,7 +752,8 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name, At this point, the binlog file and position of this transaction must have been removed from ActiveTranx. */ - assert(!active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, + assert(!getMasterEnabled() || + !active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)); /* Update the status counter. */ |