Commit 24911a34 authored by Anel Husakovic's avatar Anel Husakovic Committed by Andrew Hutchings
parent 023bb2fc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment