diff options
-rw-r--r-- | sql/sql_repl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 343e128af7a..8bbb8c52d95 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -248,7 +248,10 @@ bool log_in_use(const char* log_name) size_t log_name_len = strlen(log_name) + 1; THD *tmp; bool result = 0; - DEBUG_SYNC(current_thd,"purge_logs_after_lock_index_before_thread_count"); +#ifndef BDUG_OFF + if (current_thd) + DEBUG_SYNC(current_thd,"purge_logs_after_lock_index_before_thread_count"); +#endif mysql_mutex_lock(&LOCK_thread_count); I_List_iterator<THD> it(threads); |