Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/sqlite/patches/0002-Use-seperate-page-cache-pools-for-each-sqlite-connec.patch

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 From 1a93d36e638db170407cd0cbdaccd30c576ad4c4 Mon Sep 17 00:00:00 2001 1 From 48c000f21a646815c76026f3ced1f53847c2d66f Mon Sep 17 00:00:00 2001
2 From: rmcilroy <rmcilroy@chromium.org> 2 From: rmcilroy <rmcilroy@chromium.org>
3 Date: Thu, 20 Jun 2013 22:50:12 +0000 3 Date: Thu, 20 Jun 2013 22:50:12 +0000
4 Subject: [PATCH 02/13] Use seperate page-cache pools for each sqlite 4 Subject: [PATCH 02/10] Use seperate page-cache pools for each sqlite
5 connection. 5 connection.
6 6
7 Due to multiple different subsystems using sqlite, the shared global page 7 Due to multiple different subsystems using sqlite, the shared global page
8 cache policy does not suite our use-cases on Chrome very well. This CL 8 cache policy does not suite our use-cases on Chrome very well. This CL
9 enables a compile time flag to be set to disable shared cache pools. 9 enables a compile time flag to be set to disable shared cache pools.
10 10
11 BUG=243769 11 BUG=243769
12 12
13 Original review URL: https://chromiumcodereview.appspot.com/17413004 13 Original review URL: https://chromiumcodereview.appspot.com/17413004
14 --- 14 ---
15 third_party/sqlite/src/src/pcache1.c | 6 +++++- 15 third_party/sqlite/src/src/pcache1.c | 6 +++++-
16 1 file changed, 5 insertions(+), 1 deletion(-) 16 1 file changed, 5 insertions(+), 1 deletion(-)
17 17
18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p cache1.c 18 diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/p cache1.c
19 index 7147f6a..940bd62 100644 19 index 110d7ec656ae..3b938ce7b2f8 100644
20 --- a/third_party/sqlite/src/src/pcache1.c 20 --- a/third_party/sqlite/src/src/pcache1.c
21 +++ b/third_party/sqlite/src/src/pcache1.c 21 +++ b/third_party/sqlite/src/src/pcache1.c
22 @@ -668,6 +668,8 @@ static int pcache1Init(void *NotUsed){ 22 @@ -690,6 +690,8 @@ static int pcache1Init(void *NotUsed){
23 ** private PGroup (mode-1). pcache1.separateCache is false if the single 23 ** private PGroup (mode-1). pcache1.separateCache is false if the single
24 ** PGroup in pcache1.grp is used for all page caches (mode-2). 24 ** PGroup in pcache1.grp is used for all page caches (mode-2).
25 ** 25 **
26 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS 26 + ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
27 + ** 27 + **
28 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT 28 ** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
29 ** 29 **
30 ** * Use a unified cache in single-threaded applications that have 30 ** * Use a unified cache in single-threaded applications that have
31 @@ -677,7 +679,9 @@ static int pcache1Init(void *NotUsed){ 31 @@ -699,7 +701,9 @@ static int pcache1Init(void *NotUsed){
32 ** 32 **
33 ** * Otherwise use separate caches (mode-1) 33 ** * Otherwise use separate caches (mode-1)
34 */ 34 */
35 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) 35 -#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
36 +#ifdef SQLITE_SEPARATE_CACHE_POOLS 36 +#ifdef SQLITE_SEPARATE_CACHE_POOLS
37 + pcache1.separateCache = 1; 37 + pcache1.separateCache = 1;
38 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) 38 +#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT)
39 pcache1.separateCache = 0; 39 pcache1.separateCache = 0;
40 #elif SQLITE_THREADSAFE 40 #elif SQLITE_THREADSAFE
41 pcache1.separateCache = sqlite3GlobalConfig.pPage==0 41 pcache1.separateCache = sqlite3GlobalConfig.pPage==0
42 -- 42 --
43 2.7.0.rc3.207.g0ac5344 43 2.11.0
44 44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698