Commit dcbe5acb authored by brian@zim.(none)'s avatar brian@zim.(none)

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"
parent 68076249
...@@ -50,6 +50,8 @@ enum options_client ...@@ -50,6 +50,8 @@ enum options_client
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
#endif #endif
OPT_TRIGGERS, OPT_TRIGGERS,
OPT_MYSQL_ONLY_PRINT,
OPT_MYSQL_PRESERVE_SCHEMA_ENTER, OPT_MYSQL_PRESERVE_SCHEMA_EXIT,
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE, OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA, OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID
......
This diff is collapsed.
...@@ -725,7 +725,7 @@ CREATE TABLE t_crashme ( f1 BIGINT); ...@@ -725,7 +725,7 @@ CREATE TABLE t_crashme ( f1 BIGINT);
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1; CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1; CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*) count(*)
103 104
drop view a2, a1; drop view a2, a1;
drop table t_crashme; drop table t_crashme;
select table_schema,table_name, column_name from select table_schema,table_name, column_name from
...@@ -796,7 +796,7 @@ delete from mysql.db where user='mysqltest_4'; ...@@ -796,7 +796,7 @@ delete from mysql.db where user='mysqltest_4';
flush privileges; flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*) table_schema count(*)
information_schema 17 information_schema 18
mysql 18 mysql 18
create table t1 (i int, j int); create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row create trigger trg1 before insert on t1 for each row
......
This diff is collapsed.
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--exec $MYSQL_SLAP --silent --drop-schema --concurrency=5 --concurrency-load=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --number-rows=12 --auto-generate-sql --exec $MYSQL_SLAP --silent --concurrency=5 --concurrency-load=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --number-rows=12 --auto-generate-sql
--exec $MYSQL_SLAP --silent --drop-schema --concurrency=5 --concurrency-load=5 --iterations=20 --number-rows=10 --query="select * from t1" --data="INSERT INTO t1 VALUES (1, 'This is a test')" --create="CREATE TABLE t1 (id int, name varchar(64))" --exec $MYSQL_SLAP --only-print --concurrency=5 --concurrency-load=5 --iterations=20 --number-rows=10 --query="select * from t1" --data="INSERT INTO t1 VALUES (1, 'This is a test')" --create="CREATE TABLE t1 (id int, name varchar(64))"
--exec $MYSQL_SLAP --silent --drop-schema --concurrency=5 --concurrency-load=5 --iterations=20 --delimiter=";" --number-rows=10 --query="select * from t1;select * from t2" --data="INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32))" --exec $MYSQL_SLAP --silent --concurrency=5 --concurrency-load=5 --iterations=20 --number-rows=10 --query="select * from t1" --data="INSERT INTO t1 VALUES (1, 'This is a test')" --create="CREATE TABLE t1 (id int, name varchar(64))"
--exec $MYSQL_SLAP --only-print --concurrency=5 --concurrency-load=5 --iterations=20 --delimiter=";" --number-rows=10 --query="select * from t1;select * from t2" --data="INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32))"
--exec $MYSQL_SLAP --silent --concurrency=5 --concurrency-load=5 --iterations=20 --delimiter=";" --number-rows=10 --query="select * from t1;select * from t2" --data="INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2')" --create="CREATE TABLE t1 (id int, name varchar(64)); create table t2(foo1 varchar(32), foo2 varchar(32))"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment