Skip to content

Commit

Permalink
Fix performance_schema group_mutex, which was initialzied before regi…
Browse files Browse the repository at this point in the history
…stered to PSI.
  • Loading branch information
zwang28 committed Jun 19, 2021
1 parent feee560 commit 6c392b4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sql/threadpool_unix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,12 @@ bool tp_init()
DBUG_ENTER("tp_init");
threadpool_started= true;

#ifdef HAVE_PSI_INTERFACE
PSI_register(mutex);
PSI_register(cond);
PSI_register(thread);
#endif

for(uint i=0; i < array_elements(all_groups); i++)
{
thread_group_init(&all_groups[i], get_connection_attrib());
Expand All @@ -1667,11 +1673,6 @@ bool tp_init()
sql_print_error("Can't set threadpool size to %d",threadpool_size);
DBUG_RETURN(1);
}
#ifdef HAVE_PSI_INTERFACE
PSI_register(mutex);
PSI_register(cond);
PSI_register(thread);
#endif

pool_timer.tick_interval= threadpool_stall_limit;
start_timer(&pool_timer);
Expand Down

0 comments on commit 6c392b4

Please sign in to comment.