diff --git a/core/ajax/update.php b/core/ajax/update.php
index 31b8c0dbb65a08c2e30aebdb322304cf93142359..6015a901eb795c24c424b3d0c02f4367c2dc344d 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -36,11 +36,15 @@ if (OC::checkUpgrade(false)) {
  * @param UpdateWatcher $watcher
  */
 function __doFileCacheUpgrade($watcher) {
-	$query = \OC_DB::prepare('
+	try {
+		$query = \OC_DB::prepare('
 		SELECT DISTINCT `user`
 		FROM `*PREFIX*fscache`
-	');
-	$result = $query->execute();
+		');
+		$result = $query->execute();
+	} catch (\Exception $e) {
+		return;
+	}
 	$users = $result->fetchAll();
 	if(count($users) == 0) {
 		return;