Commit graph

23 commits

Author SHA1 Message Date
Sergey Vojtovich
45d3ada7c2 MDEV-4684 - Enhancement request: --init-command support for mysqlslap
Added --init-command argument to mysqlslap: SQL Command to execute
when connecting to MySQL server. Will automatically be re-executed
when reconnecting.
2013-09-17 18:51:14 +04:00
Venkata Sidagam
1fa5d5b83a Bug #11766072 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWS
This bug is a duplicate of Bug #31173, which was pushed to the 
mysql-trunk 5.6 on 4th Aug, 2010. This is just a back-port of 
the fix


mysql-test/r/mysqlslap.result:
  A test added as part of the fix for Bug #59107
mysql-test/t/mysqlslap.test:
  A test added as part of the fix for Bug #59107
2012-04-09 14:51:46 +05:30
Nirbhay Choubey
cb0e49c000 Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.

mysqlslap uses a schema to run its tests on and later
drops it if auto-generate-sql is used. This can be a
problem, if the schema is an already existing one.

If create-schema is used with auto-generate-sql option,
mysqlslap while performing the cleanup, drops the specified
database.

Fixed by introducing an option --no-drop, which, if used,
will prevent the dropping of schema at the end of the test.


client/client_priv.h:
  Bug#11765157 - 58090: mysqlslap drops schema specified in
                 create_schema if auto-generate-sql also set.
  
  Added an option.
client/mysqlslap.c:
  Bug#11765157 - 58090: mysqlslap drops schema specified in
                 create_schema if auto-generate-sql also set.
  
  Introduced an option 'no-drop' to forbid the removal of schema
  even if 'create' or 'auto-generate-sql' options are used.
mysql-test/r/mysqlslap.result:
  Added a testcase for Bug#11765157.
mysql-test/t/mysqlslap.test:
  Added a testcase for Bug#11765157.
2011-04-08 12:22:44 +05:30
unknown
68f766ae80 mysqlslap.result, mysqlslap.test:
Post-commit fix.


mysql-test/t/mysqlslap.test:
  Post-commit fix.
mysql-test/r/mysqlslap.result:
  Post-commit fix.
2007-09-27 13:15:15 +05:00
unknown
ea04054077 Fixed bug #29985.
Multiple-result processing is required during the execution
of CALL statements for stored procedures, however the mysqlslap
client lacked that processing.



client/mysqlslap.c:
  Fixed bug #29985.
  1. Connection flags have been changed: the CLIENT_MULTI_STATEMENTS
  flag has been added.
  2. The run_task function has been modified to process multiple
  result sets.
mysql-test/t/mysqlslap.test:
  Added test case for bug #29985.
mysql-test/r/mysqlslap.result:
  Added test case for bug #29985.
2007-09-17 21:39:07 +05:00
unknown
c8b9315db3 Extending tests for detach (found a memory issue in it, this fixes that and now tests it).
client/mysqlslap.c:
  Fix memory allocation
mysql-test/t/mysqlslap.test:
  Extend test for --detach
2007-08-20 13:03:50 -07:00
unknown
c862dab155 Added a test for pre-statement call, and fixed connection/deconnect code so that the rest of bbench can be ran by others.
client/client_priv.h:
  Clean up of options.
client/mysqlslap.c:
  Cleanup of the connection and reconnect code.
mysql-test/r/mysqlslap.result:
  Add of new test.
mysql-test/t/mysqlslap.test:
  Additional test.
2007-06-15 17:22:57 -07:00
unknown
1517e2c456 Added pre and post option to test run (allows me to adjust an engine once all of the data has been loaded).
Kinda obvious that this was going to come up ;)


client/client_priv.h:
  New options
client/mysqlslap.c:
  Added option for pre/post run
mysql-test/r/mysqlslap.result:
  Updated tests
mysql-test/t/mysqlslap.test:
  Updated test
2007-03-26 02:24:49 -07:00
unknown
9055eaa1eb The pthread() support was not working. Once I fixed use-thread in a previous push I realized that the pthread/windows code was not working. I've replaced the fork/thread design with a pure pthread design using condition timers and broadcast.
Ramification, UNIX now uses thread, support for slaves had to be dropped and there is no need for the --use-threads flag.
Added --concurrency=0 option so that it will start at 1 and keep going up until something bad happens :)


client/client_priv.h:
  Dead option removed
client/mysqlslap.c:
  Removed lock code, replaced with posix thread code.
mysql-test/mysql-test-run.pl:
  Removed dead option
mysql-test/t/mysqlslap.test:
  Removed dead option
2007-03-16 15:20:22 -07:00
unknown
260e43e75d Correctly report load type.
Updated engine to also handle create options
Secondary indexes can now be generated (aka the test PeterZ thoughts!)


client/client_priv.h:
  Option for generating secondary indexes
client/mysqlslap.c:
  Option for generating secondary index operations. 
  Cleaned up memory allocation that was wasteful.
  Engine options are now possible
  Correctly report test type.
mysql-test/t/mysqlslap.test:
  Additional test for secondary indexes
sql/authors.h:
  Updated for Patrick
2007-03-15 23:39:07 -07:00
unknown
465a31bc59 Cleaned up memory allocation so that in all cases of malloc failure the application ends execution.
Default values for auto-generate have been made available for adjusting. Key test for rights now works with either type of keys. 


client/client_priv.h:
  Adding options for execution defines
client/mysqlslap.c:
  Cleaning up memory allocation so that malloc failures die. 
  
  Fixed execution so that defaults are not adjustable.
mysql-test/t/mysqlslap.test:
  Adding a test for defaults.
2007-03-12 10:25:11 -07:00
unknown
7ab5c6820c Fixed buffer overflow cases (should not be possible to do...)
Fixed for autoincrement support/GUID


client/client_priv.h:
  Option for autoincrement
client/mysqlslap.c:
  Fixed buffer overflow where sprintf is used (now removed).
  Fixed for auto-increment support/GUID.
mysql-test/t/mysqlslap.test:
  Added test for auto increment, update, write, read, and mixed.
2007-03-06 17:14:59 -08:00
unknown
b89bbaac9d This is a patch to test the default schema location.
client/mysqlslap.c:
  Formating
mysql-test/t/mysqlslap.test:
  Adding test to test for using non-default  database.
2006-03-10 08:54:12 -08:00
unknown
88ece282f5 Fixed bug #16167
Added --use-threads option for porting to Windows. 


client/mysqlslap.c:
  Addinng thread option for porting to windows (second piece of code)
  Also added flush call to fix one bug
mysql-test/r/mysqlslap.result:
  New results
mysql-test/t/disabled.def:
  Bug 16167 should not be fixed
mysql-test/t/mysqlslap.test:
  Added test for new use-threads option
2006-01-12 12:27:25 -08:00
unknown
1b93e6d8d0 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/wl2930/my51-wl2930-integration


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/mysqlslap.result:
  Real output produced, remove "echo"
mysql-test/t/mysqlslap.test:
  Real output produced, remove "echo"
2006-01-10 08:00:17 +01:00
unknown
7a79331461 Add simple printout from mysqlslap.test to avoid empty result file
mysql-test/r/mysqlslap.result:
  Update test result
mysql-test/t/mysqlslap.test:
  Print something when test is complete
2006-01-09 20:19:06 +01:00
unknown
9b9af86ac0 Cleaned up memory allocation to be a little more staight forward (though I suspect someone will hate my sizeof() increment).
Nothing really to see here. Updated comments in code.

More comments are probably needed, but isn't that always the case?


client/mysqlslap.c:
  Updated docs. 
  Removed complicated malloc calls with a single malloc. Cleaned up the way statements were be free'd (aka its now a function instead of a bunch of copy/paste).
  Removed older and not so accurate timediff() call. Cleaned up call to parse out concurrency.
mysql-test/t/mysqlslap.test:
  Edited the tests to make sure we check default concurrency (we can't test concurrency normally since in theory the results could be random).
  You will noticed that the result was not changed.
2006-01-01 20:08:45 -08:00
unknown
5f209e9036 Now uses a single pass testing loop. Dual pass made no sense.
Now does averaging when running iterations. 
Realligned a bunch of code and continued to remove global variables.
Added CSV output along with printable.
Structures are now provided for print options so adding XML, HTML, ... should now be trivial.


client/client_priv.h:
  Simplified options
client/mysqlslap.c:
  Giant cleanup.
  We now do single pass testing, not dual pass. The dual pass made no sense really especially when you started adding in more stats.
  Modified the testing loop so that it should not be possible to have both a fork() and thread version (which will make it easier to port to windows should someone want to).
mysql-test/r/mysqlslap.result:
  New results
mysql-test/t/mysqlslap.test:
  Adjusting for new options, and removed "archive" from the tests just in case archive is not compiled.
2006-01-01 16:40:02 -08:00
unknown
4348dc672f New option to run multiple engines through the same test:
--engine="myisam,archive"

--number-of-rows has been removed for the time being and replaced with
 option to allow you to just repeat multiple time all of the inserts you specifed with data. When number-of-rows-returns it will be instead used for averaging rows while growing concurrency. 

Returned stats now has accurent row and query counts since it includes a multiple for the rows and queries added.

Parser is now a touch smarter and understands end of file issues if you have a delimiter at the end of the file.  


client/client_priv.h:
  New options
client/mysqlslap.c:
  Modifications for doing repeated tests.
mysql-test/r/mysqlslap.result:
  New result file
mysql-test/t/mysqlslap.test:
  Changes in tests to make sure concurrency failures would not occur.
2005-12-25 02:03:53 -08:00
unknown
ac2708382d See message in mysqlslap.c, but basically
1) Parsing now works
2) Options are safer, aka it doesn't kill the machine and it cleans up after itself
3) Option of --only-print added so that you can see what it does.
4) Tiny cleanup of the auto generate sql. A lot more needs to be done with this, for it to be very valuable. I suspect it doesn't work all that well.
5) Delimeter is now a single character. No good escaping going on.
6) You can now change which schema it is runninng against.

Now I think I can go make use of it! 

Though I need to add support for a "only run this many inserts, divide by the number of clients connecting, to really test scaling"



client/client_priv.h:
  Added new options for mysqlslap
client/mysqlslap.c:
  Lots of cleanup.
  
  Highlights:
  1) Parsing now works much better, though I suspect escaping issues still exist. All strings are parsed into a typedef called statement. This is a linked structure with each statement held in it. I added options for length so that when the time comes to fix this for binary data the guts of the main executing loop will not need to be changed
  2) Cleaned up options so that it will not destroy data by default and will clean up itself by default. So no leaving around of gobs of data.
  3) Added option of --only-print to see the SQL it would have executed
  4) Parsing handles whitespace trick (which will come back to bite someone I expect)
  5) Delimeter is now a single character
  6) All memory allocated should now be freed.
  7) Set defaults so that only a single run will occur if none are given.
  8) You can now change the schema that it runs against.
mysql-test/r/information_schema.result:
  Fix for Antony's merge
mysql-test/r/mysqlslap.result:
  New result set
  More testing
mysql-test/t/mysqlslap.test:
  More testing
2005-12-24 15:41:40 -08:00
unknown
14b62752e0 mysql-test-run.pl:
Don't run "mysqlslap" on Windows
mysqlslap.test:
  We don't run "mysqlslap" on Windows
mysql.sln:
  Removed build of "client/mysqlslap.c" on Windows


VC++Files/mysql.sln:
  Removed build of "client/mysqlslap.c" on Windows
mysql-test/t/mysqlslap.test:
  We don't run "mysqlslap" on Windows
mysql-test/mysql-test-run.pl:
  Don't run "mysqlslap" on Windows
2005-12-21 06:02:04 +01:00
unknown
568dcdd1a0 WORKLOG #2983 Removed --help from test. (did so already, don't know why
push didn't push that previous changeset!)


mysql-test/r/mysqlslap.result:
  WORKLOG #2983 removed --help results
mysql-test/t/mysqlslap.test:
  WORKLOG #2983 removed --help from test
2005-12-05 07:50:16 -08:00
unknown
a9d363e698 Worklog #2983 Mysqlslap load emulator tool and accompanied test, results
and modifications to mysql-test-run(.pl/.sh)


client/Makefile.am:
  Worklog #2983, added mysqlslap to Makefile.am
client/client_priv.h:
  Worklog #2983 Added OPT_CREATE_SLAP_SCHEMA
mysql-test/mysql-test-run.pl:
  Worklog #2983 Added mysqlslap test binary to test script
mysql-test/mysql-test-run.sh:
  Worklog #2983 Added mysqlslap binary def to test script
client/mysqlslap.c:
  Worklog #2983 mysqlslap.c, new utility for running load simulation.
mysql-test/r/mysqlslap.result:
  Worklog #2983 Mysqlslap test results
mysql-test/t/mysqlslap.test:
  Worklog #2983 Mysqlslap test
2005-11-29 16:02:21 -08:00