MDEV-18225 Avoid use of LOCK_prepared_stmt_count mutex in Statement_map destructo
This mutex can be freed when server shuts down (when thread_count goes down to 0) , but it is still used inside THD::~THD() when Statement_map is destroyed. The fix is to call Statement_map::reset() at the point where thread_count is still positive, and avoid locking LOCK_prepared_stmt_count in THD destructor.
Showing
Please register or sign in to comment