1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug #30389: connection_id() always return 0 in embedded server

Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.
This commit is contained in:
tsmith@ramayana.hindu.god
2007-08-27 14:31:27 -06:00
parent c0fd09224b
commit 2c44def1ee
5 changed files with 33 additions and 0 deletions

View File

@ -564,6 +564,17 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
init_alloc_root(&mysql->field_alloc, 8192, 0);
}
/**
@brief Initialize a new THD for a connection in the embedded server
@param client_flag Client capabilities which this thread supports
@return pointer to the created THD object
@todo
This function copies code from several places in the server, including
create_new_thread(), and prepare_new_connection_state(). This should
be refactored to avoid code duplication.
*/
void *create_embedded_thd(int client_flag)
{
THD * thd= new THD;