mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 15:45:33 +02:00
Reuse THD for new user connections
- To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
This commit is contained in:
parent
54f3e18f6e
commit
89685d55d7
34 changed files with 220 additions and 130 deletions
|
|
@ -36,7 +36,10 @@
|
|||
static bool no_threads_end(THD *thd, bool put_in_cache)
|
||||
{
|
||||
if (thd)
|
||||
{
|
||||
unlink_thd(thd);
|
||||
delete thd;
|
||||
}
|
||||
return 1; // Abort handle_one_connection
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue