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
06a49eca
Commit
06a49eca
authored
Jan 03, 2006
by
knielsen@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory problem: Both the allocation and pointer arithmetics on the
head_sptr array was wrong.
parent
23e84337
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
client/mysqlslap.c
client/mysqlslap.c
+3
-3
No files found.
client/mysqlslap.c
View file @
06a49eca
...
...
@@ -281,7 +281,7 @@ int main(int argc, char **argv)
stats
*
head_sptr
;
stats
*
sptr
;
head_sptr
=
(
stats
*
)
my_malloc
(
sizeof
(
stats
)
*
*
current
,
MYF
(
MY_ZEROFILL
));
head_sptr
=
(
stats
*
)
my_malloc
(
sizeof
(
stats
)
*
iterations
,
MYF
(
MY_ZEROFILL
));
bzero
(
&
conclusion
,
sizeof
(
conclusions
));
...
...
@@ -290,7 +290,7 @@ int main(int argc, char **argv)
else
client_limit
=
actual_queries
;
for
(
x
=
0
,
sptr
=
head_sptr
;
x
<
iterations
;
x
++
,
sptr
+
=
sizeof
(
stats
)
)
for
(
x
=
0
,
sptr
=
head_sptr
;
x
<
iterations
;
x
++
,
sptr
+
+
)
{
/*
We might not want to load any data, such as when we are calling
...
...
@@ -1192,7 +1192,7 @@ generate_stats(conclusions *con, statement *eng, stats *sptr)
con
->
avg_rows
=
sptr
->
rows
;
/* With no next, we know it is the last element that was malloced */
for
(
ptr
=
sptr
,
x
=
0
;
x
<
iterations
;
ptr
+
=
sizeof
(
stats
)
,
x
++
)
for
(
ptr
=
sptr
,
x
=
0
;
x
<
iterations
;
ptr
+
+
,
x
++
)
{
con
->
avg_timing
+=
ptr
->
timing
;
...
...
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