Skip to content

Commit 759cf54

Browse files
author
monty@hundin.mysql.fi
committedSep 2, 2001
Small changes in benchmark suite
1 parent 825ad1f commit 759cf54

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed
 

‎sql-bench/test-insert.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,12 +1011,13 @@ if ($server->small_rollback_segment())
10111011
### Test speed of IN( value list)
10121012
###
10131013

1014-
if ($limits->{'functions'})
1014+
if ($limits->{'left_outer_join'})
10151015
{
10161016
if ($opt_lock_tables)
10171017
{
10181018
$sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr;
10191019
}
1020+
print "\n";
10201021
do_many($dbh,$server->create("bench2",
10211022
["id int NOT NULL"],
10221023
["primary key (id)"]));
@@ -1029,13 +1030,8 @@ if ($limits->{'functions'})
10291030
die $DBI::errstr;
10301031
}
10311032
test_where_in("bench1","bench2","id",1,10);
1032-
test_where_in("bench1","bench2","id",11,100);
1033+
test_where_in("bench1","bench2","id",11,min(100,$max_tests));
10331034
test_where_in("bench1","bench2","id",101,min(1000,$max_tests));
1034-
test_where_in("bench1","bench2","id",1000,$max_tests/2);
1035-
if ($max_tests > 1000)
1036-
{
1037-
test_where_in("bench1","bench2","id",$max_tests/2+1,$max_tests);
1038-
}
10391035
if ($opt_lock_tables)
10401036
{
10411037
$sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr;
@@ -1647,7 +1643,7 @@ sub check_or_range
16471643
}
16481644

16491645
#
1650-
# Test if SELECT ... WHERE id in(value-list)
1646+
# General test of SELECT ... WHERE id in(value-list)
16511647
#
16521648

16531649
sub test_where_in
@@ -1673,10 +1669,10 @@ sub test_where_in
16731669
$server->vacuum(1,\$dbh,"bench1");
16741670
}
16751671

1676-
time_fetch_all_rows("\nTesting SELECT ... WHERE id in ($to values)",
1672+
time_fetch_all_rows("Testing SELECT ... WHERE id in ($to values)",
16771673
"select_in", $query, $dbh,
16781674
$range_loop_count);
16791675
time_fetch_all_rows(undef, "select_join_in",
1680-
"SELECT $t1.* FROM $t1,$t2 WHERE $t1.$id=$t2.$id",
1676+
"SELECT $t1.* FROM $t2 left outer join $t1 on ($t1.$id=$t2.$id)",
16811677
$dbh, $range_loop_count);
16821678
}

0 commit comments

Comments
 (0)
Please sign in to comment.