summaryrefslogtreecommitdiff
path: root/sql-bench/test-ATIS.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-ATIS.sh
parent897e7453d6c669f7460a242a81b874bd0302007b (diff)
downloadmariadb-git-40bfbe0bfaaa1bedf9dd7ff5fdcb836eb102911d.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");