Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d5915675
Commit
d5915675
authored
Mar 16, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug in windows where attr was not working. Removed.
client/mysqlslap.c: attr issue on windows
parent
dcd672e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
client/mysqlslap.c
client/mysqlslap.c
+6
-13
No files found.
client/mysqlslap.c
View file @
d5915675
...
...
@@ -1560,12 +1560,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
con
.
limit
=
limit
;
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
);
thread_counter
=
0
;
...
...
@@ -1576,7 +1570,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
for
(
x
=
0
;
x
<
concur
;
x
++
)
{
/* nowucreate the thread */
if
(
pthread_create
(
&
mainthread
,
&
attr
,
run_task
,
if
(
pthread_create
(
&
mainthread
,
NULL
,
run_task
,
(
void
*
)
&
con
)
!=
0
)
{
fprintf
(
stderr
,
"%s: Could not create thread
\n
"
,
...
...
@@ -1606,7 +1600,6 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
pthread_cond_timedwait
(
&
count_threshhold
,
&
counter_mutex
,
&
abstime
);
}
pthread_mutex_unlock
(
&
counter_mutex
);
pthread_attr_destroy
(
&
attr
);
gettimeofday
(
&
end_time
,
NULL
);
...
...
@@ -1793,13 +1786,13 @@ parse_option(const char *origin, option_string **stmt, char delm)
char
*
option_ptr
;
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
;
/* Move past the : and the first string */
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
));
}
else
...
...
@@ -1863,7 +1856,7 @@ parse_delimiter(const char *script, statement **stmt, char delm)
tmp
=
tmp
->
next
)
{
count
++
;
tmp
->
string
=
my_strndup
(
ptr
,
(
size_
t
)(
retstr
-
ptr
),
MYF
(
MY_FAE
));
tmp
->
string
=
my_strndup
(
ptr
,
(
uin
t
)(
retstr
-
ptr
),
MYF
(
MY_FAE
));
tmp
->
length
=
(
size_t
)(
retstr
-
ptr
);
ptr
+=
retstr
-
ptr
+
1
;
if
(
isspace
(
*
ptr
))
...
...
@@ -1873,7 +1866,7 @@ parse_delimiter(const char *script, statement **stmt, char delm)
if
(
ptr
!=
script
+
length
)
{
tmp
->
string
=
my_strndup
(
ptr
,
(
size_
t
)((
script
+
length
)
-
ptr
),
tmp
->
string
=
my_strndup
(
ptr
,
(
uin
t
)((
script
+
length
)
-
ptr
),
MYF
(
MY_FAE
));
tmp
->
length
=
(
size_t
)((
script
+
length
)
-
ptr
);
count
++
;
...
...
@@ -1942,7 +1935,7 @@ print_conclusions_csv(conclusions *con)
con
->
users
,
/* Children used */
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment