diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-08-20 23:49:04 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-08-20 23:49:15 +0200 |
commit | 8f201c7383d221ac71b9ba7761c15bec583bd93d (patch) | |
tree | 04ff24c130d43d769cbce640d3ce281074cc4f49 /lib/private/repair | |
parent | 04c982a96e19f2254739c24ee8c6b568edcb4190 (diff) | |
download | nextcloud-server-8f201c7383d221ac71b9ba7761c15bec583bd93d.tar.gz nextcloud-server-8f201c7383d221ac71b9ba7761c15bec583bd93d.zip |
Explicily close the statement cursors
Fixes the issue that makes SQLite freeze on later tests.
Diffstat (limited to 'lib/private/repair')
-rw-r--r-- | lib/private/repair/repairlegacystorages.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/repair/repairlegacystorages.php b/lib/private/repair/repairlegacystorages.php index 9d38b256c88..ab123afeca6 100644 --- a/lib/private/repair/repairlegacystorages.php +++ b/lib/private/repair/repairlegacystorages.php @@ -89,6 +89,7 @@ class RepairLegacyStorages extends BasicEmitter { $result = $this->findStorageInCacheStatement->execute(array($oldNumericId, $newNumericId)); $row1 = $this->findStorageInCacheStatement->fetch(); $row2 = $this->findStorageInCacheStatement->fetch(); + $this->findStorageInCacheStatement->closeCursor(); if ($row2 !== false) { // two results means both storages have data, not auto-fixable throw new \OC\RepairException( @@ -123,6 +124,7 @@ class RepairLegacyStorages extends BasicEmitter { $newId = \OC\Files\Cache\Storage::adjustStorageId($newId); $oldId = \OC\Files\Cache\Storage::adjustStorageId($oldId); $rowCount = $this->renameStorageStatement->execute(array($newId, $oldId)); + $this->renameStorageStatement->closeCursor(); return ($rowCount === 1); } |