| Index: third_party/sqlite/sqlite-src-3070603/ext/fts3/fts3.c
|
| diff --git a/third_party/sqlite/src/ext/fts3/fts3.c b/third_party/sqlite/sqlite-src-3070603/ext/fts3/fts3.c
|
| similarity index 99%
|
| copy from third_party/sqlite/src/ext/fts3/fts3.c
|
| copy to third_party/sqlite/sqlite-src-3070603/ext/fts3/fts3.c
|
| index d11572ac4cc57d2ddae7087a7e9eed71d93fdd68..20da05164d2a6cbffb0c2859e4859dadcc75606c 100644
|
| --- a/third_party/sqlite/src/ext/fts3/fts3.c
|
| +++ b/third_party/sqlite/sqlite-src-3070603/ext/fts3/fts3.c
|
| @@ -291,7 +291,6 @@
|
| ** deletions and duplications. This would basically be a forced merge
|
| ** into a single segment.
|
| */
|
| -#define CHROMIUM_FTS3_CHANGES 1
|
|
|
| #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
|
|
|
| @@ -630,9 +629,6 @@ static void fts3DatabasePageSize(int *pRc, Fts3Table *p){
|
| sqlite3_step(pStmt);
|
| p->nPgsz = sqlite3_column_int(pStmt, 0);
|
| rc = sqlite3_finalize(pStmt);
|
| - }else if( rc==SQLITE_AUTH ){
|
| - p->nPgsz = 1024;
|
| - rc = SQLITE_OK;
|
| }
|
| }
|
| assert( p->nPgsz>0 || rc!=SQLITE_OK );
|
| @@ -1230,13 +1226,7 @@ static int fts3ScanInteriorNode(
|
| isFirstTerm = 0;
|
| zCsr += sqlite3Fts3GetVarint32(zCsr, &nSuffix);
|
|
|
| - /* NOTE(shess): Previous code checked for negative nPrefix and
|
| - ** nSuffix and suffix overrunning zEnd. Additionally corrupt if
|
| - ** the prefix is longer than the previous term, or if the suffix
|
| - ** causes overflow.
|
| - */
|
| - if( nPrefix<0 || nSuffix<0 /* || nPrefix>nBuffer */
|
| - || &zCsr[nSuffix]<zCsr || &zCsr[nSuffix]>zEnd ){
|
| + if( nPrefix<0 || nSuffix<0 || &zCsr[nSuffix]>zEnd ){
|
| rc = SQLITE_CORRUPT;
|
| goto finish_scan;
|
| }
|
| @@ -3656,11 +3646,7 @@ 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))
|
| @@ -3670,15 +3656,11 @@ 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. */
|
| -#else
|
| if( rc==SQLITE_OK ){
|
| rc = sqlite3_create_module_v2(
|
| db, "fts4", &fts3Module, (void *)pHash, 0
|
| );
|
| }
|
| -#endif
|
| return rc;
|
| }
|
|
|
|
|