| Index: third_party/sqlite/patches/0002-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| diff --git a/third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch b/third_party/sqlite/patches/0002-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| similarity index 51%
|
| rename from third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| rename to third_party/sqlite/patches/0002-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| index d2678e76e44d521e871b8e3ea80704a4a1cf02cf..f2e67339b1d5ac4756239f357083390a890ae939 100644
|
| --- a/third_party/sqlite/patches/0003-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| +++ b/third_party/sqlite/patches/0002-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch
|
| @@ -1,7 +1,7 @@
|
| -From 3a6d9302ff14aec82291c7e2212ce37b7453ce9f Mon Sep 17 00:00:00 2001
|
| +From d0e21d482f39c92f444957859bc9252dc6bb5239 Mon Sep 17 00:00:00 2001
|
| From: rmcilroy <rmcilroy@chromium.org>
|
| Date: Thu, 20 Jun 2013 22:50:12 +0000
|
| -Subject: [PATCH 03/16] Use seperate page-cache pools for each sqlite
|
| +Subject: [PATCH 02/10] Use seperate page-cache pools for each sqlite
|
| connection.
|
|
|
| Due to multiple different subsystems using sqlite, the shared global page
|
| @@ -16,29 +16,29 @@ Original review URL: https://chromiumcodereview.appspot.com/17413004
|
| 1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
| diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/pcache1.c
|
| -index a8c3217..3fcee4b 100644
|
| +index 7147f6a..76030f9 100644
|
| --- a/third_party/sqlite/src/src/pcache1.c
|
| +++ b/third_party/sqlite/src/src/pcache1.c
|
| -@@ -567,6 +567,8 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
|
| - ** PGroup. In other words, separateCache is true for mode (1) where no
|
| - ** mutexing is required.
|
| +@@ -668,6 +668,8 @@ static int pcache1Init(void *NotUsed){
|
| + ** private PGroup (mode-1). pcache1.separateCache is false if the single
|
| + ** PGroup in pcache1.grp is used for all page caches (mode-2).
|
| **
|
| + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
|
| + **
|
| ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
|
| **
|
| - ** * Always use a unified cache in single-threaded applications
|
| -@@ -574,7 +576,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
|
| - ** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
|
| - ** use separate caches (mode-1)
|
| + ** * Use a unified cache in single-threaded applications that have
|
| +@@ -677,7 +679,9 @@ static int pcache1Init(void *NotUsed){
|
| + **
|
| + ** * Otherwise use separate caches (mode-1)
|
| */
|
| --#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
|
| +-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
|
| +#ifdef SQLITE_SEPARATE_CACHE_POOLS
|
| + const int separateCache = 1;
|
| -+#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
|
| - const int separateCache = 0;
|
| - #else
|
| - int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
|
| ++#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
|
| + pcache1.separateCache = 0;
|
| + #elif SQLITE_THREADSAFE
|
| + pcache1.separateCache = sqlite3GlobalConfig.pPage==0
|
| --
|
| -2.2.1
|
| +2.7.0
|
|
|
|
|