mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03: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:
@@ -139,9 +139,10 @@ typedef struct st_thr_lock {
|
||||
|
||||
extern LIST *thr_lock_thread_list;
|
||||
extern mysql_mutex_t THR_LOCK_lock;
|
||||
struct st_my_thread_var;
|
||||
|
||||
my_bool init_thr_lock(void); /* Must be called once/thread */
|
||||
void thr_lock_info_init(THR_LOCK_INFO *info);
|
||||
void thr_lock_info_init(THR_LOCK_INFO *info, struct st_my_thread_var *tmp);
|
||||
void thr_lock_init(THR_LOCK *lock);
|
||||
void thr_lock_delete(THR_LOCK *lock);
|
||||
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data,
|
||||
|
Reference in New Issue
Block a user