Below is the list of changes that have just been committed into a local
5.1 repository of knielsen. When knielsen does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2026 06/01/03 11:09:18 knielsen@stripped +1 -0
Fix memory problem: Both the allocation and pointer arithmetics on the
head_sptr array was wrong.
client/mysqlslap.c
1.13 06/01/03 11:09:14 knielsen@stripped +3 -3
Fix memory problem: Both the allocation and pointer arithmetics on the
head_sptr array was wrong.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: knielsen
# Host: rt.int.sifira.dk
# Root: /usr/local/mysql/mysql-5.1-new
--- 1.12/client/mysqlslap.c 2006-01-02 13:19:09 +01:00
+++ 1.13/client/mysqlslap.c 2006-01-03 11:09:14 +01:00
@@ -281,7 +281,7 @@
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 @@
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 @@
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;
| Thread |
|---|
| • bk commit into 5.1 tree (knielsen:1.2026) | knielsen | 3 Jan |