File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1703,16 +1703,10 @@ THD::~THD()
1703
1703
free_root (&transaction.mem_root ,MYF (0 ));
1704
1704
mysql_mutex_destroy (&LOCK_thd_data);
1705
1705
1706
- /* The session may still holding the lock in an ongoing transaction, so we
1707
- * trylock and then unlock before destroying it. Note: we will not have
1708
- * another thread holding the lock to update the read_only hash table while
1709
- * this thread is being deleted. LOCK_thd_remove is locked before updating
1710
- * local read_only hash map, which prevents any thread being deleted. See
1711
- * sql_db.cc:update_thd_db_read_only() for details. */
1712
- mysql_mutex_trylock (&LOCK_thd_db_read_only_hash);
1706
+ mysql_mutex_lock (&LOCK_thd_db_read_only_hash);
1707
+ my_hash_free (&db_read_only_hash);
1713
1708
mysql_mutex_unlock (&LOCK_thd_db_read_only_hash);
1714
1709
1715
- my_hash_free (&db_read_only_hash);
1716
1710
mysql_mutex_destroy (&LOCK_thd_db_read_only_hash);
1717
1711
1718
1712
#ifndef DBUG_OFF
You can’t perform that action at this time.
0 commit comments