summaryrefslogtreecommitdiff
path: root/sql-bench/test-select.sh
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-08 15:54:22 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-08 15:54:22 +0200
commit40bfbe0bfaaa1bedf9dd7ff5fdcb836eb102911d (patch)
treef041c20e4bea9553dbfec4de709b72029a800b95 /sql-bench/test-select.sh
parent897e7453d6c669f7460a242a81b874bd0302007b (diff)
downloadmariadb-git-40bfbe0bfaaa1bedf9dd7ff5fdcb836eb102911d.tar.gz
--fast now does all insert/update loops in one transactions
Diffstat (limited to 'sql-bench/test-select.sh')
-rw-r--r--sql-bench/test-select.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh
index eba2a7085d8..62e978a945f 100644
--- a/sql-bench/test-select.sh
+++ b/sql-bench/test-select.sh
@@ -92,6 +92,12 @@ if ($opt_fast && defined($server->{vacuum}))
print "Inserting $opt_loop_count rows\n";
$loop_time=new Benchmark;
+
+if ($opt_fast && $server->{transactions})
+{
+ $dbh->{AutoCommit} = 0;
+}
+
$query="insert into bench1 values (";
$half_done=$opt_loop_count/2;
for ($id=0,$rev_id=$opt_loop_count-1 ; $id < $opt_loop_count ; $id++,$rev_id--)
@@ -105,6 +111,12 @@ for ($id=0,$rev_id=$opt_loop_count-1 ; $id < $opt_loop_count ; $id++,$rev_id--)
}
}
+if ($opt_fast && $server->{transactions})
+{
+ $dbh->commit;
+ $dbh->{AutoCommit} = 1;
+}
+
$end_time=new Benchmark;
print "Time to insert ($opt_loop_count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";