Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups"...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Sep 2014 06:07:08 +0000 (06:07 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Sep 2014 06:07:08 +0000 (06:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136647

Reviewed by Darin Adler.

* loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
Don't try to delete the tables if we can't expect to have them yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp

index 1abe0a1..667719a 100644 (file)
@@ -1,3 +1,13 @@
+2014-09-08  Alexey Proskuryakov  <ap@apple.com>
+
+        Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups" error "no such table: CacheGroups"
+        https://bugs.webkit.org/show_bug.cgi?id=136647
+
+        Reviewed by Darin Adler.
+
+        * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
+        Don't try to delete the tables if we can't expect to have them yet.
+
 2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
 
         REGRESSION (r172153): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
index 0358f3d..f079a3b 100644 (file)
@@ -587,7 +587,9 @@ void ApplicationCacheStorage::verifySchemaVersion()
     if (version == schemaVersion)
         return;
 
-    deleteTables();
+    // Version will be 0 if we just created an empty file. Trying to delete tables would cause errors, because they don't exist yet.
+    if (version)
+        deleteTables();
 
     // Update user version.
     SQLiteTransaction setDatabaseVersion(m_database);