diff options
author | jonas@perch.ndb.mysql.com <> | 2006-09-04 13:43:34 +0200 |
---|---|---|
committer | jonas@perch.ndb.mysql.com <> | 2006-09-04 13:43:34 +0200 |
commit | 96ff8b4c521aba696ba62154605ea2a04a927c6e (patch) | |
tree | 2f11faf90e49ea4e1e47cec032231077bb5adbfd /sql/log.cc | |
parent | b60be73461bb295b8b797a49c1a1b8b97baa55fe (diff) | |
download | mariadb-git-96ff8b4c521aba696ba62154605ea2a04a927c6e.tar.gz |
bug#21965 - replication
fix deadlock if master switches log file in parallell with "show master logs"
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc index c530f15a84f..5ae89dfeb50 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -409,13 +409,18 @@ shutdown the MySQL server and restart it.", log_name, errno); int MYSQL_LOG::get_current_log(LOG_INFO* linfo) { pthread_mutex_lock(&LOCK_log); + int ret = raw_get_current_log(linfo); + pthread_mutex_unlock(&LOCK_log); + return ret; +} + +int MYSQL_LOG::raw_get_current_log(LOG_INFO* linfo) +{ strmake(linfo->log_file_name, log_file_name, sizeof(linfo->log_file_name)-1); linfo->pos = my_b_tell(&log_file); - pthread_mutex_unlock(&LOCK_log); return 0; } - /* Move all data up in a file in an filename index file |