mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Do not use the "thd" pointer to identify a thread in the embedded lib,
but rather use the "thread_id" counter. Fixes bug#27078: Compile error: lib_sql.cc cast from 'THD*' to 'pthread_t' loses precision libmysqld/lib_sql.cc: Avoid casting a pointer to a (possibly) int, which will not compile on some platforms: Do not use the "thd" pointer to identify a thread in the embedded lib, but rather use the "thread_id" counter. Patch is proposed by Monty. Fixes bug#27078.
This commit is contained in:
parent
bc671e2f90
commit
db5aab1d2c
1 changed files with 1 additions and 1 deletions
|
@ -540,7 +540,7 @@ void *create_embedded_thd(int client_flag)
|
||||||
thd->set_time();
|
thd->set_time();
|
||||||
thd->init_for_queries();
|
thd->init_for_queries();
|
||||||
thd->client_capabilities= client_flag;
|
thd->client_capabilities= client_flag;
|
||||||
thd->real_id= (pthread_t) thd;
|
thd->real_id= thd->thread_id;
|
||||||
|
|
||||||
thd->db= NULL;
|
thd->db= NULL;
|
||||||
thd->db_length= 0;
|
thd->db_length= 0;
|
||||||
|
|
Loading…
Reference in a new issue