summaryrefslogtreecommitdiff
path: root/client/mysqlslap.c
diff options
context:
space:
mode:
authorunknown <brian@piggy.tangent.org>2007-08-09 13:01:29 -0700
committerunknown <brian@piggy.tangent.org>2007-08-09 13:01:29 -0700
commit8d025792a5cbb8a1ed5361116d5d4f5d1db10a56 (patch)
treeef47b62477f647a1716779b07a12abe922ddf12c /client/mysqlslap.c
parent07410c94ccc2218c3720e26ea0c9238885be01e3 (diff)
downloadmariadb-git-8d025792a5cbb8a1ed5361116d5d4f5d1db10a56.tar.gz
Two bugs in one! The count call was duplicating internally the counts for loaded tests (not autosql tests, just loaded). This could manifest itself by executing by file, or by executing a pre statement.
BUG#29803 client/mysqlslap.c: 1) Declared VOID on pre/post statement return values (we were not using the return value and I prefer to see this declared explicitly) 2) Removed extra count call which was causing duplication of rows with parsed files examples. mysql-test/r/mysqlslap.result: The additional selects come from fixing the pre return count call. Dropping the final select is a result of fixing the true count.
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r--client/mysqlslap.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index aa15141bfdc..43d8b1b1560 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1407,15 +1407,15 @@ get_options(int *argc,char ***argv)
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_pre_statements)
- actual_queries= parse_delimiter(tmp_string, &pre_statements,
- delimiter[0]);
+ (void)parse_delimiter(tmp_string, &pre_statements,
+ delimiter[0]);
my_free(tmp_string, MYF(0));
}
else if (user_supplied_pre_statements)
{
- actual_queries= parse_delimiter(user_supplied_pre_statements,
- &pre_statements,
- delimiter[0]);
+ (void)parse_delimiter(user_supplied_pre_statements,
+ &pre_statements,
+ delimiter[0]);
}
if (user_supplied_post_statements && my_stat(user_supplied_post_statements, &sbuf, MYF(0)))
@@ -1438,14 +1438,14 @@ get_options(int *argc,char ***argv)
tmp_string[sbuf.st_size]= '\0';
my_close(data_file,MYF(0));
if (user_supplied_post_statements)
- parse_delimiter(tmp_string, &post_statements,
- delimiter[0]);
+ (void)parse_delimiter(tmp_string, &post_statements,
+ delimiter[0]);
my_free(tmp_string, MYF(0));
}
else if (user_supplied_post_statements)
{
- parse_delimiter(user_supplied_post_statements, &post_statements,
- delimiter[0]);
+ (void)parse_delimiter(user_supplied_post_statements, &post_statements,
+ delimiter[0]);
}
if (verbose >= 2)
@@ -1993,7 +1993,6 @@ parse_delimiter(const char *script, statement **stmt, char delm)
ptr+= retstr - ptr + 1;
if (isspace(*ptr))
ptr++;
- count++;
}
if (ptr != script+length)