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:
Vladislav Vaintroub 2021-09-21 19:14:07 +02:00
parent 699de65d5e
commit b4074069b2

View File

@ -4922,6 +4922,9 @@ MYSQL_THD create_background_thd()
thd->set_command(COM_DAEMON);
thd->system_thread= SYSTEM_THREAD_GENERIC;
thd->security_ctx->host_or_ip= "";
thd->real_id= 0;
thd->thread_id= 0;
thd->query_id= 0;
return thd;
}