Skip to content

Commit 167c0c3

Browse files
grooverdanjanlindstrom
authored andcommitted
wsrep_init_thd_for_schema: initialize THD::thr_create_utime
63620ca identfied that thr_create_utime wasn't initialized and therefore couldn't be used origin copying point for the initialization of other variables. By replacing with a micotime_interval, we missed that the THD has just been created, and thr_create_utime should be set too. This hasn't hit any MSAN errors so far but its possible to access thr_create_utime in some codepath so lets initialize it.
1 parent 63620ca commit 167c0c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/wsrep_schema.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ static void wsrep_init_thd_for_schema(THD *thd)
720720
thd->security_ctx->skip_grants();
721721
thd->system_thread= SYSTEM_THREAD_GENERIC;
722722
thd->real_id=pthread_self(); // Keep purify happy
723-
thd->prior_thr_create_utime= thd->start_utime= microsecond_interval_timer();
723+
thd->prior_thr_create_utime= thd->start_utime=
724+
thd->thr_create_utime= microsecond_interval_timer();
724725
/* No Galera replication */
725726
thd->variables.wsrep_on= 0;
726727
/* No binlogging */

0 commit comments

Comments
 (0)