@@ -1011,12 +1011,13 @@ if ($server->small_rollback_segment())
1011
1011
# ## Test speed of IN( value list)
1012
1012
# ##
1013
1013
1014
- if ($limits -> {' functions ' })
1014
+ if ($limits -> {' left_outer_join ' })
1015
1015
{
1016
1016
if ($opt_lock_tables )
1017
1017
{
1018
1018
$sth = $dbh -> do(" UNLOCK TABLES" ) || die $DBI ::errstr;
1019
1019
}
1020
+ print " \n" ;
1020
1021
do_many($dbh ,$server -> create(" bench2" ,
1021
1022
[" id int NOT NULL" ],
1022
1023
[" primary key (id)" ]));
@@ -1029,13 +1030,8 @@ if ($limits->{'functions'})
1029
1030
die $DBI ::errstr;
1030
1031
}
1031
1032
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 ) ) ;
1033
1034
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
- }
1039
1035
if ($opt_lock_tables )
1040
1036
{
1041
1037
$sth = $dbh -> do(" UNLOCK TABLES" ) || die $DBI ::errstr;
@@ -1647,7 +1643,7 @@ sub check_or_range
1647
1643
}
1648
1644
1649
1645
#
1650
- # Test if SELECT ... WHERE id in(value-list)
1646
+ # General test of SELECT ... WHERE id in(value-list)
1651
1647
#
1652
1648
1653
1649
sub test_where_in
@@ -1673,10 +1669,10 @@ sub test_where_in
1673
1669
$server -> vacuum(1,\$ dbh," bench1" );
1674
1670
}
1675
1671
1676
- time_fetch_all_rows(" \nTesting SELECT ... WHERE id in ($to values)" ,
1672
+ time_fetch_all_rows(" Testing SELECT ... WHERE id in ($to values)" ,
1677
1673
" select_in" , $query , $dbh ,
1678
1674
$range_loop_count );
1679
1675
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 ) " ,
1681
1677
$dbh , $range_loop_count );
1682
1678
}
0 commit comments