Commit 34b26587 authored by brian@zim.(none)'s avatar brian@zim.(none)

Bug in windows where attr was not working. Removed.

parent 6d0286c8
...@@ -1560,12 +1560,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1560,12 +1560,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
con.limit= limit; con.limit= limit;
pthread_t mainthread; /* Thread descriptor */ pthread_t mainthread; /* Thread descriptor */
pthread_attr_t attr; /* Thread attributes */
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr,
PTHREAD_CREATE_DETACHED);
pthread_mutex_lock(&counter_mutex); pthread_mutex_lock(&counter_mutex);
thread_counter= 0; thread_counter= 0;
...@@ -1576,7 +1570,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1576,7 +1570,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
for (x= 0; x < concur; x++) for (x= 0; x < concur; x++)
{ {
/* nowucreate the thread */ /* nowucreate the thread */
if (pthread_create(&mainthread, &attr, run_task, if (pthread_create(&mainthread, NULL, run_task,
(void *)&con) != 0) (void *)&con) != 0)
{ {
fprintf(stderr,"%s: Could not create thread\n", fprintf(stderr,"%s: Could not create thread\n",
...@@ -1606,7 +1600,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1606,7 +1600,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime); pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime);
} }
pthread_mutex_unlock(&counter_mutex); pthread_mutex_unlock(&counter_mutex);
pthread_attr_destroy(&attr);
gettimeofday(&end_time, NULL); gettimeofday(&end_time, NULL);
...@@ -1793,13 +1786,13 @@ parse_option(const char *origin, option_string **stmt, char delm) ...@@ -1793,13 +1786,13 @@ parse_option(const char *origin, option_string **stmt, char delm)
char *option_ptr; char *option_ptr;
tmp->length= (size_t)(buffer_ptr - buffer); tmp->length= (size_t)(buffer_ptr - buffer);
tmp->string= my_strndup(ptr, tmp->length, MYF(MY_FAE)); tmp->string= my_strndup(ptr, (uint)tmp->length, MYF(MY_FAE));
option_ptr= ptr + 1 + tmp->length; option_ptr= ptr + 1 + tmp->length;
/* Move past the : and the first string */ /* Move past the : and the first string */
tmp->option_length= (size_t)(retstr - option_ptr); tmp->option_length= (size_t)(retstr - option_ptr);
tmp->option= my_strndup(option_ptr, tmp->option_length, tmp->option= my_strndup(option_ptr, (uint)tmp->option_length,
MYF(MY_FAE)); MYF(MY_FAE));
} }
else else
...@@ -1863,7 +1856,7 @@ parse_delimiter(const char *script, statement **stmt, char delm) ...@@ -1863,7 +1856,7 @@ parse_delimiter(const char *script, statement **stmt, char delm)
tmp= tmp->next) tmp= tmp->next)
{ {
count++; count++;
tmp->string= my_strndup(ptr, (size_t)(retstr - ptr), MYF(MY_FAE)); tmp->string= my_strndup(ptr, (uint)(retstr - ptr), MYF(MY_FAE));
tmp->length= (size_t)(retstr - ptr); tmp->length= (size_t)(retstr - ptr);
ptr+= retstr - ptr + 1; ptr+= retstr - ptr + 1;
if (isspace(*ptr)) if (isspace(*ptr))
...@@ -1873,7 +1866,7 @@ parse_delimiter(const char *script, statement **stmt, char delm) ...@@ -1873,7 +1866,7 @@ parse_delimiter(const char *script, statement **stmt, char delm)
if (ptr != script+length) if (ptr != script+length)
{ {
tmp->string= my_strndup(ptr, (size_t)((script + length) - ptr), tmp->string= my_strndup(ptr, (uint)((script + length) - ptr),
MYF(MY_FAE)); MYF(MY_FAE));
tmp->length= (size_t)((script + length) - ptr); tmp->length= (size_t)((script + length) - ptr);
count++; count++;
...@@ -1942,7 +1935,7 @@ print_conclusions_csv(conclusions *con) ...@@ -1942,7 +1935,7 @@ print_conclusions_csv(conclusions *con)
con->users, /* Children used */ con->users, /* Children used */
con->avg_rows /* Queries run */ con->avg_rows /* Queries run */
); );
my_write(csv_file, buffer, strlen(buffer), MYF(0)); my_write(csv_file, buffer, (uint)strlen(buffer), MYF(0));
} }
void void
......
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