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