Index: third_party/sqlite/patches/0008-fts3-Disable-fts3_tokenizer-and-fts4.patch |
diff --git a/third_party/sqlite/patches/0010-fts3-Disable-fts3_tokenizer-and-fts4.patch b/third_party/sqlite/patches/0008-fts3-Disable-fts3_tokenizer-and-fts4.patch |
similarity index 66% |
rename from third_party/sqlite/patches/0010-fts3-Disable-fts3_tokenizer-and-fts4.patch |
rename to third_party/sqlite/patches/0008-fts3-Disable-fts3_tokenizer-and-fts4.patch |
index 3fa78ddefaf683a7a77e6fb1e701b742cf79bbc9..9e49a9ba60034df94759737a3ffb86879eef34e1 100644 |
--- a/third_party/sqlite/patches/0010-fts3-Disable-fts3_tokenizer-and-fts4.patch |
+++ b/third_party/sqlite/patches/0008-fts3-Disable-fts3_tokenizer-and-fts4.patch |
@@ -1,11 +1,12 @@ |
-From b11ecfada70198bc5b6dc8419d2b7b3c7f6542b8 Mon Sep 17 00:00:00 2001 |
+From c18bc2961fbb401a1941e736d81bd048c3b82e88 Mon Sep 17 00:00:00 2001 |
From: Scott Hess <shess@chromium.org> |
Date: Tue, 16 Dec 2014 13:02:27 -0800 |
-Subject: [PATCH 10/23] [fts3] Disable fts3_tokenizer and fts4. |
+Subject: [PATCH 08/16] [fts3] Disable fts3_tokenizer and fts4. |
fts3_tokenizer allows a SQLite user to specify a pointer to call as a |
function, which has obvious sercurity implications. Disable fts4 until |
-someone explicitly decides to own support for it. |
+someone explicitly decides to own support for it. Disable fts3tokenize |
+virtual table until someone explicitly decides to own support for it. |
No original review URL because this was part of the initial Chromium commit. |
--- |
@@ -13,18 +14,18 @@ No original review URL because this was part of the initial Chromium commit. |
1 file changed, 9 insertions(+) |
diff --git a/third_party/sqlite/src/ext/fts3/fts3.c b/third_party/sqlite/src/ext/fts3/fts3.c |
-index 20da051..7accb11 100644 |
+index 2b93c62..dbd2835 100644 |
--- a/third_party/sqlite/src/ext/fts3/fts3.c |
+++ b/third_party/sqlite/src/ext/fts3/fts3.c |
-@@ -291,6 +291,7 @@ |
- ** deletions and duplications. This would basically be a forced merge |
- ** into a single segment. |
+@@ -287,6 +287,7 @@ |
+ ** query logic likewise merges doclists so that newer data knocks out |
+ ** older data. |
*/ |
+#define CHROMIUM_FTS3_CHANGES 1 |
+ #include "fts3Int.h" |
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) |
- |
-@@ -3646,7 +3647,11 @@ int sqlite3Fts3Init(sqlite3 *db){ |
+@@ -3828,7 +3829,11 @@ int sqlite3Fts3Init(sqlite3 *db){ |
** module with sqlite. |
*/ |
if( SQLITE_OK==rc |
@@ -36,17 +37,19 @@ index 20da051..7accb11 100644 |
&& SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1)) |
&& SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", 1)) |
&& SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", 1)) |
-@@ -3656,11 +3661,15 @@ int sqlite3Fts3Init(sqlite3 *db){ |
+@@ -3838,6 +3843,9 @@ int sqlite3Fts3Init(sqlite3 *db){ |
rc = sqlite3_create_module_v2( |
db, "fts3", &fts3Module, (void *)pHash, hashDestroy |
); |
+#if CHROMIUM_FTS3_CHANGES && !SQLITE_TEST |
-+ /* Disable fts4 pending review. */ |
++ /* Disable fts4 and tokenizer vtab pending review. */ |
+#else |
if( rc==SQLITE_OK ){ |
rc = sqlite3_create_module_v2( |
db, "fts4", &fts3Module, (void *)pHash, 0 |
- ); |
+@@ -3846,6 +3854,7 @@ int sqlite3Fts3Init(sqlite3 *db){ |
+ if( rc==SQLITE_OK ){ |
+ rc = sqlite3Fts3InitTok(db, (void *)pHash); |
} |
+#endif |
return rc; |