[Pkg-owncloud-commits] [owncloud] 03/61: only commit in case a transaction is active

David Prévot taffit at moszumanska.debian.org
Thu Jul 31 03:51:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 303e504fcbd9b4b017a0774a62a0e9b65b24b6c8
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Wed Jul 23 20:13:19 2014 +0200

    only commit in case a transaction is active
---
 lib/private/db/migrator.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php
index 6443cf4..d05f845 100644
--- a/lib/private/db/migrator.php
+++ b/lib/private/db/migrator.php
@@ -110,7 +110,9 @@ class Migrator {
 			$this->dropTable($tmpName);
 		} catch (DBALException $e) {
 			// pgsql needs to commit it's failed transaction before doing anything else
-			$this->connection->commit();
+			if ($this->connection->isTransactionActive()) {
+				$this->connection->commit();
+			}
 			$this->dropTable($tmpName);
 			throw new MigrationException($table->getName(), $e->getMessage());
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list