MDEV-26657 : Initialize some fields in create_background_thd()
Avoid reading uninitialized memory by thd_get_error_context_description(). Note, that THD::real_id can't be initialized at this stage, so it will be zeroed.
This commit is contained in:
parent
699de65d5e
commit
b4074069b2
@ -4922,6 +4922,9 @@ MYSQL_THD create_background_thd()
|
|||||||
thd->set_command(COM_DAEMON);
|
thd->set_command(COM_DAEMON);
|
||||||
thd->system_thread= SYSTEM_THREAD_GENERIC;
|
thd->system_thread= SYSTEM_THREAD_GENERIC;
|
||||||
thd->security_ctx->host_or_ip= "";
|
thd->security_ctx->host_or_ip= "";
|
||||||
|
thd->real_id= 0;
|
||||||
|
thd->thread_id= 0;
|
||||||
|
thd->query_id= 0;
|
||||||
return thd;
|
return thd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user