mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Simplified THD::current_linfo locking
LOG_INFO::lock was useless. It could've only protect against concurrent iterators execution, which was already protected by LOCK_thread_count. Use LOCK_thd_data instead of LOCK_thread_count as a protection against THD::current_linfo reset. Aim is to reduce usage of LOCK_thread_count and COND_thread_count. Part of MDEV-15135.
This commit is contained in:
@ -4934,15 +4934,15 @@ public:
|
||||
}
|
||||
/*
|
||||
Reset current_linfo
|
||||
Setting current_linfo to 0 needs to be done with LOCK_thread_count to
|
||||
Setting current_linfo to 0 needs to be done with LOCK_thd_data to
|
||||
ensure that adjust_linfo_offsets doesn't use a structure that may
|
||||
be deleted.
|
||||
*/
|
||||
inline void reset_current_linfo()
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_thread_count);
|
||||
mysql_mutex_lock(&LOCK_thd_data);
|
||||
current_linfo= 0;
|
||||
mysql_mutex_unlock(&LOCK_thread_count);
|
||||
mysql_mutex_unlock(&LOCK_thd_data);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user