diff options
author | Sven Sandberg <sven.sandberg@oracle.com> | 2011-05-26 12:56:17 +0200 |
---|---|---|
committer | Sven Sandberg <sven.sandberg@oracle.com> | 2011-05-26 12:56:17 +0200 |
commit | 6ffc69e0c876af9d8736e66e387a77ec300d00c3 (patch) | |
tree | 427ca663e72caf0988cc87a922f3839f1bc07a47 /sql/log.cc | |
parent | f52ff493e83a75c3b22c6cd6ef2d2552ce99a645 (diff) | |
parent | b76c277a8f46f7e1047099df4686cb06c26a08fa (diff) | |
download | mariadb-git-6ffc69e0c876af9d8736e66e387a77ec300d00c3.tar.gz |
Merged BUG#12574820 from 5.1 to 5.5
Two conflicts resolved manually:
Text conflict in sql/log.cc
Text conflict in sql/mysqld.cc
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/log.cc b/sql/log.cc index ce6b0f0a5a2..9080dcd7fa2 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3372,12 +3372,6 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) DBUG_ENTER("reset_logs"); ha_reset_logs(thd); - /* - We need to get both locks to be sure that no one is trying to - write to the index log file. - */ - mysql_mutex_lock(&LOCK_log); - mysql_mutex_lock(&LOCK_index); /* The following mutex is needed to ensure that no threads call @@ -3387,6 +3381,13 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) */ mysql_mutex_lock(&LOCK_thread_count); + /* + We need to get both locks to be sure that no one is trying to + write to the index log file. + */ + mysql_mutex_lock(&LOCK_log); + mysql_mutex_lock(&LOCK_index); + /* Save variables so that we can reopen the log */ save_name=name; name=0; // Protect against free |