Bug #29987 mysqlslap -- does not take "database" as option. Bad documentation or bad prog.
Submitted: 23 Jul 2007 20:14 Modified: 26 Oct 2007 2:45
Reporter: Johan Andersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.* OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[23 Jul 2007 20:14] Johan Andersson
Description:
http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html

 Invoke mysqlslap like this:

shell> mysqlslap [options]db_name

How to repeat:
create table t1(a integer, b char(10), primary key(a))engine=ndb;

johan@stingray:~/dev/mysqlslapd$ mysqlslap --defaults-file=/data/etc/my.cnf -uroot --query="select * from t1"
mysqlslap: Cannot run query select * from t1 ERROR : Table 'mysqlslap.t1' doesn't exist

Please observ the use of the "test" database according to docs:

johan@stingray:~/dev/mysqlslapd$ mysqlslap --defaults-file=/data/etc/my.cnf -uroot --query="select * from t1" test
mysqlslap: Cannot run query select * from t1 ERROR : Table 'mysqlslap.t1' doesn't exist

Still use database "mysqlslap"... sigh

Suggested fix:
just do it! It should be easy enough.
[23 Jul 2007 22:09] MySQL Verification Team
Thank you for the bug report.
[27 Aug 2007 18:43] Brian Aker
Hi!

The documentation on the website is very out of date (it must have been taken from an early alpha version of the tool).

Cheers,
   -Brian
[27 Aug 2007 19:01] Brian Aker
Hi!

What you are looking for is:
--create-schema

Cheers,
   -Brian
[26 Oct 2007 2:45] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

mysqlslap page now lists --create-schema option.
[16 Nov 2007 9:15] Sveta Smirnova
Paul,

documentations still contains `mysqlslap [options] db_name`. Is this because copy of the manual on the website still not updated?
[16 Nov 2007 13:49] Paul DuBois
No, it's because I updated the options but neglected to notice the syntax description. Thanks, I'll fix it.