]> source.dussan.org Git - nextcloud-server.git/commitdiff
Explicily close the statement cursors
authorVincent Petry <pvince81@owncloud.com>
Wed, 20 Aug 2014 21:49:04 +0000 (23:49 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 20 Aug 2014 21:49:15 +0000 (23:49 +0200)
Fixes the issue that makes SQLite freeze on later tests.

lib/private/repair/repairlegacystorages.php

index 9d38b256c88306ab6d80d99e2110d42b1d1cb4d9..ab123afeca6f0591736cdb770c166335dfbc5cbe 100644 (file)
@@ -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);
        }