summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-06-03 12:26:24 +0300
committermonty@hundin.mysql.fi <>2001-06-03 12:26:24 +0300
commit4014d2367ccdfe00670de3dfaeeef8389008b208 (patch)
treea8649f73d8dc4f4b298871c75089fd3e584adb6e /tests
parent0efb10e71ca1bc2391ddfd711aefff0d231a6789 (diff)
downloadmariadb-git-4014d2367ccdfe00670de3dfaeeef8389008b208.tar.gz
Added ABS() to make tests more portable.
New postgresql crash-me file. Increased blob size in benchmarks from 65K to 1M.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fork_big.pl30
1 files changed, 30 insertions, 0 deletions
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";
@@ -214,6 +215,35 @@ sub test_select
}
#
+# 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
# one loop