mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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
This commit is contained in:
@@ -982,6 +982,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
|
||||
}
|
||||
else
|
||||
{
|
||||
fflush(NULL);
|
||||
for (x= 0; x < concur; x++)
|
||||
{
|
||||
int pid;
|
||||
@@ -1026,10 +1027,19 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
|
||||
|
||||
gettimeofday(&start_time, NULL);
|
||||
|
||||
my_close(lock_file, MYF(0));
|
||||
|
||||
/*
|
||||
We look to grab a write lock at this point. Once we get it we know that
|
||||
all clients have completed their work.
|
||||
*/
|
||||
if (opt_use_threads)
|
||||
{
|
||||
if (my_lock(lock_file, F_WRLCK, 0, F_TO_EOF, MYF(0)))
|
||||
{
|
||||
fprintf(stderr,"%s: Could not get lockfile\n",
|
||||
my_progname);
|
||||
exit(0);
|
||||
}
|
||||
my_lock(lock_file, F_UNLCK, 0, F_TO_EOF, MYF(0));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1043,6 +1053,8 @@ WAIT:
|
||||
}
|
||||
gettimeofday(&end_time, NULL);
|
||||
|
||||
my_close(lock_file, MYF(0));
|
||||
|
||||
sptr->timing= timedif(end_time, start_time);
|
||||
sptr->users= concur;
|
||||
sptr->rows= limit;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,5 @@ innodb_concurrent : Results are not deterministic, Elliot will fix (BUG#3300)
|
||||
subselect : Bug#15706
|
||||
type_time : Bug#15805
|
||||
rpl_ddl : Bug#15963 SBR does not show "Definer" correctly
|
||||
mysqlslap : Bug#16167
|
||||
events : Affects flush test case. A table lock not released somewhere
|
||||
rpl_sp : Bug #16456
|
||||
|
@@ -4,6 +4,8 @@
|
||||
|
||||
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql
|
||||
|
||||
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=20 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --use-threads
|
||||
|
||||
--exec $MYSQL_SLAP --only-print --iterations=20 --query="select * from t1" --create="CREATE TABLE t1 (id int, name varchar(64)); INSERT INTO t1 VALUES (1, 'This is a test')" --delimiter=";"
|
||||
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=20 --query="select * from t1" --create="CREATE TABLE t1 (id int, name varchar(64)); INSERT INTO t1 VALUES (1, 'This is a test')" --delimiter=";"
|
||||
|
||||
|
Reference in New Issue
Block a user