From fc67606d3942cdea7a8c75c8605e866a5dc87621 Mon Sep 17 00:00:00 2001 From: phisch Date: Wed, 23 Nov 2016 12:27:06 +0100 Subject: commit transaction after select query Signed-off-by: Lukas Reschke --- lib/private/Share20/DefaultShareProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index fded7442d20..23e8db34d7f 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -162,7 +162,6 @@ class DefaultShareProvider implements IShareProvider { $this->dbConn->beginTransaction(); $qb->execute(); $id = $this->dbConn->lastInsertId('*PREFIX*share'); - $this->dbConn->commit(); // Now fetch the inserted share and create a complete share object $qb = $this->dbConn->getQueryBuilder(); @@ -172,6 +171,7 @@ class DefaultShareProvider implements IShareProvider { $cursor = $qb->execute(); $data = $cursor->fetch(); + $this->dbConn->commit(); $cursor->closeCursor(); if ($data === false) { -- cgit v1.2.3