fix
authorChristian Grothoff <christian@grothoff.org>
Sun, 4 Apr 2010 22:27:57 +0000 (22:27 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 4 Apr 2010 22:27:57 +0000 (22:27 +0000)
src/datastore/plugin_datastore_sqlite.c

index cecdf094f6ff0126710cc0b5ce3a55f4d8e802da..0b575c981cbdcfd955a28feef5e3f75f6d01bf28 100644 (file)
@@ -1609,9 +1609,11 @@ process_stat_done (void *cls,
             sq_prepare (plugin->dbh,
                         "PRAGMA page_count",
                         &stmt));
-      CHECK (SQLITE_ROW ==
-            sqlite3_step (stmt));
-      pages = sqlite3_column_int64 (stmt, 0);
+      if (SQLITE_ROW ==
+         sqlite3_step (stmt))
+       pages = sqlite3_column_int64 (stmt, 0);
+      else
+       pages = 0;
       sqlite3_finalize (stmt);
       CHECK (SQLITE_OK ==
             sq_prepare (plugin->dbh,