]> source.dussan.org Git - nextcloud-server.git/commitdiff
write error message to log file in case insert to file cache failed - took hours...
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 14:32:28 +0000 (15:32 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 14:39:29 +0000 (15:39 +0100)
lib/files/cache/cache.php

index f288919df747157792a2a9aafa5a9c3012aed681..1ff66f11f180de599169d60b19991d7cb719ebd7 100644 (file)
@@ -203,7 +203,10 @@ class Cache {
 
                        $query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')'
                                . ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
-                       $query->execute($params);
+                       $result = $query->execute($params);
+                       if (\MDB2::isError($result)) {
+                               \OCP\Util::writeLog('cache', 'Insert to cache failed: '.$result, \OCP\Util::ERROR);
+                       }
 
                        return (int)\OC_DB::insertid('*PREFIX*filecache');
                }