Anel Husakovic 2023-02-08 12:24:25 +01:00 committed by Andrew Hutchings
parent 023bb2fc20
commit 24911a34b3

View file

@ -1768,6 +1768,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
uint x;
struct timeval start_time, end_time;
thread_context con;
int error;
pthread_t mainthread; /* Thread descriptor */
pthread_attr_t attr; /* Thread attributes */
DBUG_ENTER("run_scheduler");
@ -1776,8 +1777,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
con.limit= limit;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr,
PTHREAD_CREATE_DETACHED);
if ((error= pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)))
{
printf("Got error: %d from pthread_attr_setdetachstate\n", error);
exit(1);
}
pthread_mutex_lock(&counter_mutex);
thread_counter= 0;