From 0637b85bb35f52ecccd6b8578f11d2a0b251d3de Mon Sep 17 00:00:00 2001 From: Baron Schwartz Date: Mon, 4 Jun 2012 10:08:06 -0400 Subject: [PATCH] only commit if not autocommit; fixes some newly broken tests --- bin/pt-index-usage | 2 +- lib/IndexUsage.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pt-index-usage b/bin/pt-index-usage index 7c65535a..e64780d5 100755 --- a/bin/pt-index-usage +++ b/bin/pt-index-usage @@ -4861,7 +4861,7 @@ sub save_results { } } - $dbh->commit; + $dbh->commit unless $dbh->{AutoCommit}; return; } diff --git a/lib/IndexUsage.pm b/lib/IndexUsage.pm index 08e384a4..06e169c8 100644 --- a/lib/IndexUsage.pm +++ b/lib/IndexUsage.pm @@ -308,7 +308,7 @@ sub save_results { } } - $dbh->commit; + $dbh->commit unless $dbh->{AutoCommit}; return; }