Bug#19553099 EXPIRE_LOGS_DAYS=1 CRASH MYSQLD DURING RESTART, DBUG_SYNC(NULL, ...)
- Restarting mysqld with --expire-log-days=1 triggers 'log_in_use()' to be called while current_thd is NULL. - Check current_thd before calling DEBUG_SYNC() to avoid passing NULL pointer to DEBUG_SYNC() - Wrap debug code construct inside #ifndef DBUG_OFF like in other parts of the file
This commit is contained in:
parent
d6d45fa3d8
commit
361ad4bd0b
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user