From cf42a95562695b0596bdbbcc941e86f7eab6682c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jun 2001 12:26:24 +0300 Subject: Added ABS() to make tests more portable. New postgresql crash-me file. Increased blob size in benchmarks from 65K to 1M. mysql-test/t/select.test: Added ABS() to make tests more portable mysys/tree.c: Added missing call to tree->free (MySQL didn't use this) sql-bench/Comments/postgres.benchmark: Updated documentation sql-bench/bench-init.pl.sh: Updated version number (changed blob size) sql-bench/limits/pg.cfg: New postgres results sql-bench/server-cfg.sh: Updated to PostgreSQL 7.1.1 sql-bench/test-connect.sh: Changed select_big -> select_big_str tests/fork_big.pl: Added count(distinct) test --- tests/fork_big.pl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/fork_big.pl') diff --git a/tests/fork_big.pl b/tests/fork_big.pl index 8f16db74793..4009a9da71b 100755 --- a/tests/fork_big.pl +++ b/tests/fork_big.pl @@ -88,6 +88,7 @@ for ($i=0 ; $i < $opt_threads ; $i ++) { test_select() if (($pid=fork()) == 0); $work{$pid}="select_key"; } +test_select_count() if (($pid=fork()) == 0); $work{$pid}="select_count"; test_delete() if (($pid=fork()) == 0); $work{$pid}="delete"; test_update() if (($pid=fork()) == 0); $work{$pid}="update"; test_flush() if (($pid=fork()) == 0); $work{$pid}= "flush"; @@ -213,6 +214,35 @@ sub test_select exit(0); } +# +# Do big select count(distinct..) over the table +# + +sub test_select_count +{ + my ($dbh, $i, $j, $count, $loop); + + $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + + $count=0; + $i=0; + while (!test_if_abort($dbh)) + { + for ($j=0 ; $j < $numtables ; $j++) + { + my ($table)= $testtables[$j]->[0]; + simple_query($dbh, "select count(distinct marker),count(distinct id),count(distinct info) from $table"); + $count++; + } + sleep(20); # This query is quite slow + } + $dbh->disconnect; $dbh=0; + print "Test_select: Executed $count select count(distinct) queries\n"; + exit(0); +} + # # Delete 1-5 rows from the first 2 tables. # Test ends when the number of rows for table 3 didn't change during -- cgit v1.2.1