From 6896beb0965d5cb20b60b37b96494c95b46f9147 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 16 Feb 2013 23:07:47 -0500 Subject: [PATCH] Remove use of deprecated pragma default_cache_size Instead, set cache_size at runtime --- chrome/content/zotero/xpcom/db.js | 5 +++++ chrome/content/zotero/xpcom/schema.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 2cef1afe7..3292fd801 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -1123,6 +1123,11 @@ Zotero.DBConnection.prototype._getDBConnection = function () { Zotero.DB.query("PRAGMA locking_mode=NORMAL"); } + // Set page cache size to 8MB + var pageSize = Zotero.DB.valueQuery("PRAGMA page_size"); + var cacheSize = 8192000 / pageSize; + Zotero.DB.query("PRAGMA cache_size=" + cacheSize); + // Register idle and shutdown handlers to call this.observe() for DB backup var idleService = Components.classes["@mozilla.org/widget/idleservice;1"] .getService(Components.interfaces.nsIIdleService); diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 74b6f189d..6aaed2042 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -2283,11 +2283,6 @@ Zotero.Schema = new function(){ Zotero.wait(); - // Set page cache size to 8MB - var pageSize = Zotero.DB.valueQuery("PRAGMA page_size"); - var cacheSize = 8192000 / pageSize; - Zotero.DB.query("PRAGMA default_cache_size=" + cacheSize); - // Orphaned child attachment Zotero.DB.query("UPDATE itemAttachments SET sourceItemID=NULL WHERE sourceItemID NOT IN (SELECT itemID FROM items)"); Zotero.DB.query("UPDATE itemNotes SET sourceItemID=NULL WHERE sourceItemID NOT IN (SELECT itemID FROM items)");