summaryrefslogtreecommitdiff
path: root/sql-bench/test-ATIS.sh
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-11-08 15:54:22 +0200
committermonty@hundin.mysql.fi <>2001-11-08 15:54:22 +0200
commit0fb61f0e2b9b81135558f3c7852f91a744ebd60f (patch)
treef041c20e4bea9553dbfec4de709b72029a800b95 /sql-bench/test-ATIS.sh
parent11f34156e52575fd0b8a042085dbf02638d1c727 (diff)
downloadmariadb-git-0fb61f0e2b9b81135558f3c7852f91a744ebd60f.tar.gz
--fast now does all insert/update loops in one transactions
Diffstat (limited to 'sql-bench/test-ATIS.sh')
-rw-r--r--sql-bench/test-ATIS.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql-bench/test-ATIS.sh b/sql-bench/test-ATIS.sh
index 77e0e7d79bf..fa66dadd03e 100644
--- a/sql-bench/test-ATIS.sh
+++ b/sql-bench/test-ATIS.sh
@@ -106,6 +106,12 @@ if (!$opt_skip_create)
}
else
{
+ if ($opt_fast && $server->{transactions})
+ {
+ $dbh->{AutoCommit} = 0;
+ print "Transactions enabled\n" if ($opt_debug);
+ }
+
for ($ti = 0; $ti <= $#table_names; $ti++)
{
my $table_name = $table_names[$ti];
@@ -128,8 +134,14 @@ if (!$opt_skip_create)
$row_count++;
}
}
+ if ($opt_fast && $server->{transactions})
+ {
+ $dbh->commit;
+ $dbh->{AutoCommit} = 1;
+ }
close(DATA);
}
+
if ($opt_lock_tables)
{
$dbh->do("UNLOCK TABLES");