diff options
Diffstat (limited to 'sql-bench/test-ATIS.sh')
-rwxr-xr-x | sql-bench/test-ATIS.sh | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sql-bench/test-ATIS.sh b/sql-bench/test-ATIS.sh index 35ec616d8f5..aefff503f58 100755 --- a/sql-bench/test-ATIS.sh +++ b/sql-bench/test-ATIS.sh @@ -71,10 +71,10 @@ if (!$opt_skip_create) print "Time for create_table (" . ($#tables+1) ."): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; -if ($opt_fast && defined($server->{vacuum})) -{ - $server->vacuum(0,\$dbh); -} + if ($opt_fast && defined($server->{vacuum})) + { + $server->vacuum(0,\$dbh); + } #### #### Insert data @@ -130,22 +130,26 @@ if ($opt_fast && defined($server->{vacuum})) } close(DATA); } + if ($opt_lock_tables) + { + $dbh->do("UNLOCK TABLES"); + } $end_time=new Benchmark; print "Time to insert ($row_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; } -elsif ($opt_lock_tables) -{ - @tmp=@table_names; push(@tmp,@extra_names); - $sth = $dbh->do("LOCK TABLES " . join(" READ,", @tmp) . " READ") || - die $DBI::errstr; -} if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(0,\$dbh); + $server->vacuum(0,\$dbh,@table_names); } +if ($opt_lock_tables) +{ + @tmp=@table_names; push(@tmp,@extra_names); + $sth = $dbh->do("LOCK TABLES " . join(" READ,", @tmp) . " READ") || + die $DBI::errstr; +} # # Now the fun begins. Let's do some simple queries on the result # |