summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index ccd3954e172..72e1b60f6b3 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -938,8 +938,8 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
int error=0;
VOID(pthread_mutex_lock(&LOCK_log));
- /* Test if someone closed after the is_open test */
- if (log_type != LOG_CLOSED)
+ /* Test if someone closed between the is_open test and lock */
+ if (is_open())
{
time_t skr;
ulong id;