Bug #31432 mysqlslap option --query confusing
Submitted: 7 Oct 2007 12:46 Modified: 10 Oct 2007 20:12
Reporter: Kai Voigt Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.21-beta OS:MacOS
Assigned to: CPU Architecture:Any

[7 Oct 2007 12:46] Kai Voigt
Description:
According to the documentation, --query=query and --query=filename should work the same. But it doesn't.

For some reason, the queries in a specified file are executed twice ( Average number of queries per client: 2), in contrast to just once when putting the query into the command line.

How to repeat:
kai-voigts-computer:~/MySQL/Benchmarks k$ time mysqlslap --user=root --password=root --concurrency=5 --iterations=5 --create-schema=world --query=sortbuffer/queries.sql
Benchmark
        Average number of seconds to run all queries: 17.740 seconds
        Minimum number of seconds to run all queries: 17.076 seconds
        Maximum number of seconds to run all queries: 19.093 seconds
        Number of clients running queries: 5
        Average number of queries per client: 2

real    1m28.712s
user    0m0.005s
sys     0m0.012s
kai-voigts-computer:~/MySQL/Benchmarks k$ cat sortbuffer/queries.sql 
SELECT City.Name FROM City JOIN Country ORDER BY RAND() LIMIT 1;
kai-voigts-computer:~/MySQL/Benchmarks k$ time mysqlslap --user=root --password=root --concurrency=5 --iterations=5 --create-schema=world --query="SELECT City.Name FROM City JOIN Country ORDER BY RAND() LIMIT 1;"
Benchmark
        Average number of seconds to run all queries: 8.973 seconds
        Minimum number of seconds to run all queries: 8.412 seconds
        Maximum number of seconds to run all queries: 9.336 seconds
        Number of clients running queries: 5
        Average number of queries per client: 1

real    0m44.878s
user    0m0.004s
sys     0m0.011s
[7 Oct 2007 17:08] MySQL Verification Team
duplicate of Bug #29803 ?
[7 Oct 2007 20:04] Kai Voigt
Yes, exactly the same thing. Sorry for not finding the old report.
[10 Oct 2007 20:13] Sveta Smirnova
Thank you for the feedback.

The report closed as duplicate.