diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0d9a8439ccb..883e9c688ff 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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; }