Commit 75478cd9 authored by unknown's avatar unknown

Bug#18012 mysqlslap fails if querystring starts with delimiter

- Terminate loop not only when the limit is met, but alse when there is no more stmts  


client/mysqlslap.c:
  Terminate loop not only when the limit is met, but alse when there is no more stmts
mysql-test/r/mysqlslap.result:
  Remove the extra statmemnt
parent b75fc22a
...@@ -1174,7 +1174,7 @@ run_task(thread_context *con) ...@@ -1174,7 +1174,7 @@ run_task(thread_context *con)
goto end; goto end;
} }
if (con->limit && queries < con->limit) if (!con->stmt && con->limit && queries < con->limit)
goto limit_not_met; goto limit_not_met;
end: end:
......
...@@ -129,7 +129,6 @@ INSERT INTO t1 VALUES (1, 'This is a test'); ...@@ -129,7 +129,6 @@ INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2'); insert into t2 values ('test', 'test2');
select * from t1; select * from t1;
select * from t2; select * from t2;
select * from t1;
DROP SCHEMA IF EXISTS `mysqlslap`; DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`; DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`; CREATE SCHEMA `mysqlslap`;
...@@ -141,5 +140,4 @@ INSERT INTO t1 VALUES (1, 'This is a test'); ...@@ -141,5 +140,4 @@ INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2'); insert into t2 values ('test', 'test2');
select * from t1; select * from t1;
select * from t2; select * from t2;
select * from t1;
DROP SCHEMA IF EXISTS `mysqlslap`; DROP SCHEMA IF EXISTS `mysqlslap`;
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