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

Unified Diff: third_party/sqlite/patches/0007-fts3-Disable-fts3_tokenizer-and-fts4.patch

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 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 side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/patches/0007-fts3-Disable-fts3_tokenizer-and-fts4.patch
diff --git a/third_party/sqlite/patches/0007-fts3-Disable-fts3_tokenizer-and-fts4.patch b/third_party/sqlite/patches/0007-fts3-Disable-fts3_tokenizer-and-fts4.patch
deleted file mode 100644
index daa24440021e2df95ebcde90a98c7f6f284c40c0..0000000000000000000000000000000000000000
--- a/third_party/sqlite/patches/0007-fts3-Disable-fts3_tokenizer-and-fts4.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 9283044fa483fceefcb077d7b682d570e0d099ee Mon Sep 17 00:00:00 2001
-From: Scott Hess <shess@chromium.org>
-Date: Tue, 16 Dec 2014 13:02:27 -0800
-Subject: [PATCH 07/10] [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. 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.
----
- third_party/sqlite/src/ext/fts3/fts3.c | 9 +++++++++
- 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 748faef..4f2ebb8 100644
---- a/third_party/sqlite/src/ext/fts3/fts3.c
-+++ b/third_party/sqlite/src/ext/fts3/fts3.c
-@@ -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)
-@@ -3933,7 +3934,11 @@ int sqlite3Fts3Init(sqlite3 *db){
- ** module with sqlite.
- */
- if( SQLITE_OK==rc
-+#if CHROMIUM_FTS3_CHANGES && !SQLITE_TEST
-+ /* fts3_tokenizer() disabled for security reasons. */
-+#else
- && SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer"))
-+#endif
- && 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))
-@@ -3943,6 +3948,9 @@ int sqlite3Fts3Init(sqlite3 *db){
- rc = sqlite3_create_module_v2(
- db, "fts3", &fts3Module, (void *)pHash, hashDestroy
- );
-+#if CHROMIUM_FTS3_CHANGES && !SQLITE_TEST
-+ /* Disable fts4 and tokenizer vtab pending review. */
-+#else
- if( rc==SQLITE_OK ){
- rc = sqlite3_create_module_v2(
- db, "fts4", &fts3Module, (void *)pHash, 0
-@@ -3951,6 +3959,7 @@ int sqlite3Fts3Init(sqlite3 *db){
- if( rc==SQLITE_OK ){
- rc = sqlite3Fts3InitTok(db, (void *)pHash);
- }
-+#endif
- return rc;
- }
-
---
-2.7.0
-

Powered by Google App Engine
This is Rietveld 408576698