diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2010-08-04 23:28:28 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2010-08-04 23:28:28 +0100 |
commit | e297990d5b17cf888f6ac6d0c069551c317a53ef (patch) | |
tree | 6f454203c809a0f299708a2c0be61aacce610c05 /sql/sql_repl.cc | |
parent | 75fd19ad0d2a6e6b9e813ceb1c6d5a282554abe9 (diff) | |
download | mariadb-git-e297990d5b17cf888f6ac6d0c069551c317a53ef.tar.gz |
BUG#55415 wait_for_update_bin_log enters a condition but does not leave
In sql/log.c, member function wait_for_update_bin_log, a condition is entered with
THD::enter_cond but is not exited. This might leave dangling references to the
mutex/condition in the per-thread information area.
To fix the problem, we call exit_cond to properly remove references to the mutex,
LOCK_log.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index ab6c6e738b2..413e15bf1fe 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -826,6 +826,7 @@ impossible position"; #ifndef DBUG_OFF ulong hb_info_counter= 0; #endif + const char* old_msg= thd->proc_info; signal_cnt= mysql_bin_log.signal_cnt; do { @@ -849,12 +850,15 @@ impossible position"; #endif /* reset transmit packet for the heartbeat event */ if (reset_transmit_packet(thd, flags, &ev_offset, &errmsg)) + { + thd->exit_cond(old_msg); goto err; + } if (send_heartbeat_event(net, packet, coord)) { errmsg = "Failed on my_net_write()"; my_errno= ER_UNKNOWN_ERROR; - mysql_mutex_unlock(log_lock); + thd->exit_cond(old_msg); goto err; } } @@ -863,7 +867,7 @@ impossible position"; DBUG_PRINT("wait",("binary log received update or a broadcast signal caught")); } } while (signal_cnt == mysql_bin_log.signal_cnt && !thd->killed); - mysql_mutex_unlock(log_lock); + thd->exit_cond(old_msg); } break; |