diff options
-rw-r--r-- | ext/fts5/fts5.c | 5 | ||||
-rw-r--r-- | ext/fts5/fts5Int.h | 16 | ||||
-rw-r--r-- | ext/fts5/fts5_buffer.c | 18 | ||||
-rw-r--r-- | ext/fts5/fts5_config.c | 34 | ||||
-rw-r--r-- | ext/fts5/fts5_index.c | 92 | ||||
-rw-r--r-- | ext/fts5/fts5_storage.c | 7 | ||||
-rw-r--r-- | manifest | 36 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | test/fts5aa.test | 12 | ||||
-rw-r--r-- | test/fts5ab.test | 4 | ||||
-rw-r--r-- | test/fts5ac.test | 2 | ||||
-rw-r--r-- | test/fts5ad.test | 4 | ||||
-rw-r--r-- | test/fts5ae.test | 2 | ||||
-rw-r--r-- | test/fts5ah.test | 4 | ||||
-rw-r--r-- | test/fts5aj.test | 2 |
15 files changed, 170 insertions, 70 deletions
diff --git a/ext/fts5/fts5.c b/ext/fts5/fts5.c index b47b37aba..83428bc1c 100644 --- a/ext/fts5/fts5.c +++ b/ext/fts5/fts5.c @@ -340,11 +340,6 @@ static int fts5InitVtab( rc = sqlite3Fts5ConfigDeclareVtab(pConfig); } - /* Load the contents of %_config */ - if( rc==SQLITE_OK ){ - rc = sqlite3Fts5ConfigLoad(pConfig); - } - if( rc!=SQLITE_OK ){ fts5FreeVtab(pTab, 0); pTab = 0; diff --git a/ext/fts5/fts5Int.h b/ext/fts5/fts5Int.h index a29eb3f5d..d2abadc36 100644 --- a/ext/fts5/fts5Int.h +++ b/ext/fts5/fts5Int.h @@ -60,6 +60,11 @@ typedef struct Fts5Config Fts5Config; ** be gleaned from the CREATE VIRTUAL TABLE statement. ** ** And all information loaded from the %_config table. +** +** nAutomerge: +** The minimum number of segments that an auto-merge operation should +** attempt to merge together. A value of 1 sets the object to use the +** compile time default. Zero disables auto-merge altogether. */ struct Fts5Config { sqlite3 *db; /* Database handle */ @@ -75,6 +80,7 @@ struct Fts5Config { /* Values loaded from the %_config table */ int iCookie; /* Incremented when %_config is modified */ int pgsz; /* Approximate page size used in %_data */ + int nAutomerge; /* 'automerge' setting */ }; int sqlite3Fts5ConfigParse( @@ -94,7 +100,7 @@ int sqlite3Fts5Tokenize( void sqlite3Fts5Dequote(char *z); /* Load the contents of the %_config table */ -int sqlite3Fts5ConfigLoad(Fts5Config*); +int sqlite3Fts5ConfigLoad(Fts5Config*, int); /* Set the value of a single config attribute */ int sqlite3Fts5ConfigSetValue(Fts5Config*, const char*, sqlite3_value*, int*); @@ -126,6 +132,7 @@ void sqlite3Fts5BufferZero(Fts5Buffer*); void sqlite3Fts5BufferSet(int*, Fts5Buffer*, int, const u8*); void sqlite3Fts5BufferAppendPrintf(int *, Fts5Buffer*, char *zFmt, ...); void sqlite3Fts5BufferAppendListElem(int*, Fts5Buffer*, const char*, int); +void sqlite3Fts5BufferAppend32(int*, Fts5Buffer*, int); #define fts5BufferZero(x) sqlite3Fts5BufferZero(x) #define fts5BufferGrow(a,b,c) sqlite3Fts5BufferGrow(a,b,c) @@ -133,6 +140,11 @@ void sqlite3Fts5BufferAppendListElem(int*, Fts5Buffer*, const char*, int); #define fts5BufferFree(a) sqlite3Fts5BufferFree(a) #define fts5BufferAppendBlob(a,b,c,d) sqlite3Fts5BufferAppendBlob(a,b,c,d) #define fts5BufferSet(a,b,c,d) sqlite3Fts5BufferSet(a,b,c,d) +#define fts5BufferAppend32(a,b,c) sqlite3Fts5BufferAppend32(a,b,c) + +/* Write and decode big-endian 32-bit integer values */ +void sqlite3Fts5Put32(u8*, int); +int sqlite3Fts5Get32(const u8*); typedef struct Fts5PoslistReader Fts5PoslistReader; struct Fts5PoslistReader { @@ -298,7 +310,7 @@ int sqlite3Fts5IndexIntegrityCheck(Fts5Index*, u64 cksum); */ int sqlite3Fts5IndexInit(sqlite3*); -void sqlite3Fts5IndexAutomerge(Fts5Index *p, int nMerge); +int sqlite3Fts5IndexSetCookie(Fts5Index*, int); /* ** Return the total number of entries read from the %_data table by diff --git a/ext/fts5/fts5_buffer.c b/ext/fts5/fts5_buffer.c index bea316eda..478b90361 100644 --- a/ext/fts5/fts5_buffer.c +++ b/ext/fts5/fts5_buffer.c @@ -46,6 +46,24 @@ void sqlite3Fts5BufferAppendVarint(int *pRc, Fts5Buffer *pBuf, i64 iVal){ pBuf->n += sqlite3PutVarint(&pBuf->p[pBuf->n], iVal); } +void sqlite3Fts5Put32(u8 *aBuf, int iVal){ + aBuf[0] = (iVal>>24) & 0x00FF; + aBuf[1] = (iVal>>16) & 0x00FF; + aBuf[2] = (iVal>> 8) & 0x00FF; + aBuf[3] = (iVal>> 0) & 0x00FF; +} + +int sqlite3Fts5Get32(const u8 *aBuf){ + return (aBuf[0] << 24) + (aBuf[1] << 16) + (aBuf[2] << 8) + aBuf[3]; +} + +void sqlite3Fts5BufferAppend32(int *pRc, Fts5Buffer *pBuf, int iVal){ + char *a; + if( sqlite3Fts5BufferGrow(pRc, pBuf, 4) ) return; + sqlite3Fts5Put32(&pBuf->p[pBuf->n], iVal); + pBuf->n += 4; +} + /* ** Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set ** the error code in p. If an error has already occurred when this function diff --git a/ext/fts5/fts5_config.c b/ext/fts5/fts5_config.c index 98a6fe1af..c7e729276 100644 --- a/ext/fts5/fts5_config.c +++ b/ext/fts5/fts5_config.c @@ -16,6 +16,10 @@ #include "fts5Int.h" #define FTS5_DEFAULT_PAGE_SIZE 1000 +#define FTS5_DEFAULT_AUTOMERGE 4 + +/* Maximum allowed page size */ +#define FTS5_MAX_PAGE_SIZE (128*1024) /* ** Convert an SQL-style quoted string into a normal string by removing @@ -153,6 +157,7 @@ int sqlite3Fts5ConfigParse( if( pRet==0 ) return SQLITE_NOMEM; memset(pRet, 0, sizeof(Fts5Config)); pRet->db = db; + pRet->iCookie = -1; pRet->azCol = (char**)sqlite3_malloc(sizeof(char*) * nArg); pRet->zDb = fts5Strdup(azArg[1]); @@ -307,16 +312,32 @@ int sqlite3Fts5ConfigSetValue( if( 0==sqlite3_stricmp(zKey, "cookie") ){ pConfig->iCookie = sqlite3_value_int(pVal); } + else if( 0==sqlite3_stricmp(zKey, "pgsz") ){ + int pgsz = 0; if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){ - pConfig->pgsz = sqlite3_value_int(pVal); - }else{ + pgsz = sqlite3_value_int(pVal); + } + if( pgsz<=0 || pgsz>FTS5_MAX_PAGE_SIZE ){ if( pbBadkey ) *pbBadkey = 1; + }else{ + pConfig->pgsz = pgsz; } } + else if( 0==sqlite3_stricmp(zKey, "automerge") ){ - // todo + int nAutomerge = -1; + if( SQLITE_INTEGER==sqlite3_value_numeric_type(pVal) ){ + nAutomerge = sqlite3_value_int(pVal); + } + if( nAutomerge<0 || nAutomerge>64 ){ + if( pbBadkey ) *pbBadkey = 1; + }else{ + if( nAutomerge==1 ) nAutomerge = FTS5_DEFAULT_AUTOMERGE; + pConfig->nAutomerge = nAutomerge; + } } + else if( 0==sqlite3_stricmp(zKey, "rank") ){ // todo }else{ @@ -328,7 +349,7 @@ int sqlite3Fts5ConfigSetValue( /* ** Load the contents of the %_config table into memory. */ -int sqlite3Fts5ConfigLoad(Fts5Config *pConfig){ +int sqlite3Fts5ConfigLoad(Fts5Config *pConfig, int iCookie){ const char *zSelect = "SELECT k, v FROM %Q.'%q_config'"; char *zSql; sqlite3_stmt *p = 0; @@ -336,7 +357,7 @@ int sqlite3Fts5ConfigLoad(Fts5Config *pConfig){ /* Set default values */ pConfig->pgsz = FTS5_DEFAULT_PAGE_SIZE; - pConfig->iCookie = 0; + pConfig->nAutomerge = FTS5_DEFAULT_AUTOMERGE; zSql = sqlite3_mprintf(zSelect, pConfig->zDb, pConfig->zName); if( zSql==0 ){ @@ -356,6 +377,9 @@ int sqlite3Fts5ConfigLoad(Fts5Config *pConfig){ rc = sqlite3_finalize(p); } + if( rc==SQLITE_OK ){ + pConfig->iCookie = iCookie; + } return rc; } diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c index 262d5db97..b51e7bad1 100644 --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -42,7 +42,6 @@ */ #define FTS5_WORK_UNIT 64 /* Number of leaf pages in unit of work */ -#define FTS5_MIN_MERGE 4 /* Minimum number of segments to merge */ #define FTS5_CRISIS_MERGE 16 /* Maximum number of segments to merge */ #define FTS5_MIN_DLIDX_SIZE 4 /* Add dlidx if this many empty pages */ @@ -61,10 +60,14 @@ ** 1. Structure Records: ** ** The set of segments that make up an index - the index structure - are -** recorded in a single record within the %_data table. The record is a list -** of SQLite varints. +** recorded in a single record within the %_data table. The record consists +** of a single 32-bit configuration cookie value followed by a list of +** SQLite varints. If the FTS table features more than one index (because +** there are one or more prefix indexes), it is guaranteed that all share +** the same cookie value. ** -** The record begins with three varints: +** Immediately following the configuration cookie, the record begins with +** three varints: ** ** + number of levels, ** + total number of segments on all levels, @@ -288,7 +291,6 @@ typedef struct Fts5StructureSegment Fts5StructureSegment; struct Fts5Index { Fts5Config *pConfig; /* Virtual table configuration */ char *zDataTbl; /* Name of %_data table */ - int nMinMerge; /* Minimum input segments in a merge */ int nCrisisMerge; /* Maximum allowed segments per level */ int nWorkUnit; /* Leaf pages in a "unit" of work */ @@ -960,6 +962,7 @@ static void fts5DataRemoveSegment(Fts5Index *p, int iIdx, int iSegid){ static int fts5StructureDecode( const u8 *pData, /* Buffer containing serialized structure */ int nData, /* Size of buffer pData in bytes */ + int *piCookie, /* Configuration cookie value */ Fts5Structure **ppOut /* OUT: Deserialized object */ ){ int rc = SQLITE_OK; @@ -970,9 +973,13 @@ static int fts5StructureDecode( int nByte; /* Bytes of space to allocate at pRet */ Fts5Structure *pRet = 0; /* Structure object to return */ + /* Grab the cookie value */ + if( piCookie ) *piCookie = sqlite3Fts5Get32(pData); + i = 4; + /* Read the total number of levels and segments from the start of the ** structure record. */ - i = getVarint32(&pData[i], nLevel); + i += getVarint32(&pData[i], nLevel); i += getVarint32(&pData[i], nSegment); nByte = ( sizeof(Fts5Structure) + /* Main structure */ @@ -1083,11 +1090,16 @@ static Fts5Structure *fts5StructureRead(Fts5Index *p, int iIdx){ Fts5Config *pConfig = p->pConfig; Fts5Structure *pRet = 0; /* Object to return */ Fts5Data *pData; /* %_data entry containing structure record */ + int iCookie; /* Configuration cookie */ assert( iIdx<=pConfig->nPrefix ); pData = fts5DataRead(p, FTS5_STRUCTURE_ROWID(iIdx)); if( !pData ) return 0; - p->rc = fts5StructureDecode(pData->p, pData->n, &pRet); + p->rc = fts5StructureDecode(pData->p, pData->n, &iCookie, &pRet); + + if( p->rc==SQLITE_OK && p->pConfig->iCookie!=iCookie ){ + p->rc = sqlite3Fts5ConfigLoad(p->pConfig, iCookie); + } fts5DataRelease(pData); return pRet; @@ -1129,9 +1141,16 @@ static void fts5StructureWrite(Fts5Index *p, int iIdx, Fts5Structure *pStruct){ int nSegment; /* Total number of segments */ Fts5Buffer buf; /* Buffer to serialize record into */ int iLvl; /* Used to iterate through levels */ + int iCookie; /* Cookie value to store */ nSegment = fts5StructureCountSegments(pStruct); memset(&buf, 0, sizeof(Fts5Buffer)); + + /* Append the current configuration cookie */ + iCookie = p->pConfig->iCookie; + if( iCookie<0 ) iCookie = 0; + fts5BufferAppend32(&p->rc, &buf, iCookie); + fts5BufferAppendVarint(&p->rc, &buf, pStruct->nLevel); fts5BufferAppendVarint(&p->rc, &buf, nSegment); fts5BufferAppendVarint(&p->rc, &buf, (i64)pStruct->nWriteCounter); @@ -2825,6 +2844,7 @@ static void fts5WriteAppendPoslistData( const u8 *a = aData; int n = nData; + assert( p->pConfig->pgsz>0 ); while( p->rc==SQLITE_OK && (pPage->buf.n + n)>=p->pConfig->pgsz ){ int nReq = p->pConfig->pgsz - pPage->buf.n; int nCopy = 0; @@ -3179,7 +3199,11 @@ static void fts5IndexWork( } #endif - if( nBest<p->nMinMerge && pStruct->aLevel[iBestLvl].nMerge==0 ) break; + if( nBest<p->pConfig->nAutomerge + && pStruct->aLevel[iBestLvl].nMerge==0 + ){ + break; + } fts5IndexMergeLevel(p, iIdx, &pStruct, iBestLvl, &nRem); fts5StructurePromote(p, iBestLvl+1, pStruct); assert( nRem==0 || p->rc==SQLITE_OK ); @@ -3293,7 +3317,7 @@ static void fts5FlushOneHash(Fts5Index *p, int iHash, int *pnLeaf){ } } - if( p->nMinMerge>0 ) fts5IndexWork(p, iHash, &pStruct, pgnoLast); + if( p->pConfig->nAutomerge>0 ) fts5IndexWork(p, iHash, &pStruct, pgnoLast); fts5IndexCrisisMerge(p, iHash, &pStruct); fts5StructureWrite(p, iHash, pStruct); fts5StructureRelease(pStruct); @@ -3371,7 +3395,6 @@ int sqlite3Fts5IndexOpen( memset(p, 0, sizeof(Fts5Index)); p->pConfig = pConfig; - p->nMinMerge = FTS5_MIN_MERGE; p->nCrisisMerge = FTS5_CRISIS_MERGE; p->nWorkUnit = FTS5_WORK_UNIT; p->nMaxPendingData = 1024*1024; @@ -3781,6 +3804,11 @@ int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum){ } /* +** This is part of the fts5_decode() debugging aid. +** +** Arguments pBlob/nBlob contain a serialized Fts5Structure object. This +** function appends a human-readable representation of the same object +** to the buffer passed as the second argument. */ static void fts5DecodeStructure( int *pRc, /* IN/OUT: error code */ @@ -3790,7 +3818,7 @@ static void fts5DecodeStructure( int rc; /* Return code */ Fts5Structure *p = 0; /* Decoded structure object */ - rc = fts5StructureDecode(pBlob, nBlob, &p); + rc = fts5StructureDecode(pBlob, nBlob, 0, &p); if( rc!=SQLITE_OK ){ *pRc = rc; return; @@ -3986,19 +4014,6 @@ int sqlite3Fts5IndexInit(sqlite3 *db){ } /* -** Set the minimum number of segments that an auto-merge operation should -** attempt to merge together. A value of 1 sets the object to use the -** compile time default. Zero or less disables auto-merge altogether. -*/ -void sqlite3Fts5IndexAutomerge(Fts5Index *p, int nMinMerge){ - if( nMinMerge==1 ){ - p->nMinMerge = FTS5_MIN_MERGE; - }else{ - p->nMinMerge = nMinMerge; - } -} - -/* ** Iterator pMulti currently points to a valid entry (not EOF). This ** function appends a copy of the position-list of the entry pMulti ** currently points to to buffer pBuf. @@ -4408,3 +4423,32 @@ int sqlite3Fts5IndexReads(Fts5Index *p){ return p->nRead; } +/* +** Set the 32-bit cookie value at the start of all structure records to +** the value passed as the second argument. +** +** Return SQLITE_OK if successful, or an SQLite error code if an error +** occurs. +*/ +int sqlite3Fts5IndexSetCookie(Fts5Index *p, int iNew){ + int rc = SQLITE_OK; + Fts5Config *pConfig = p->pConfig; + u8 aCookie[4]; + int i; + + sqlite3Fts5Put32(aCookie, iNew); + for(i=0; rc==SQLITE_OK && i<=pConfig->nPrefix; i++){ + sqlite3_blob *pBlob = 0; + i64 iRowid = FTS5_STRUCTURE_ROWID(i); + rc = sqlite3_blob_open( + pConfig->db, pConfig->zDb, p->zDataTbl, "block", iRowid, 1, &pBlob + ); + if( rc==SQLITE_OK ){ + sqlite3_blob_write(pBlob, aCookie, 4, 0); + rc = sqlite3_blob_close(pBlob); + } + } + + return rc; +} + diff --git a/ext/fts5/fts5_storage.c b/ext/fts5/fts5_storage.c index bbe09874c..0ce4e50e7 100644 --- a/ext/fts5/fts5_storage.c +++ b/ext/fts5/fts5_storage.c @@ -769,6 +769,13 @@ int sqlite3Fts5StorageConfigValue( sqlite3_step(pReplace); rc = sqlite3_reset(pReplace); } + if( rc==SQLITE_OK ){ + int iNew = p->pConfig->iCookie + 1; + rc = sqlite3Fts5IndexSetCookie(p->pIndex, iNew); + if( rc==SQLITE_OK ){ + p->pConfig->iCookie = iNew; + } + } return rc; } @@ -1,5 +1,5 @@ -C Add\sa\s%_config\stable\sto\sfts5. -D 2014-11-27T20:03:45.010 +C Add\sa\scookie\smechanism\sto\sensure\sthat\sthe\s%_config\stable\sis\sre-read\sas\srequired. +D 2014-11-28T20:01:13.778 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in b03432313a3aad96c706f8164fb9f5307eaf19f5 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -104,16 +104,16 @@ F ext/fts3/unicode/CaseFolding.txt 8c678ca52ecc95e16bc7afc2dbf6fc9ffa05db8c F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7 F ext/fts3/unicode/mkunicode.tcl dc6f268eb526710e2c6e496c372471d773d0c368 F ext/fts5/extract_api_docs.tcl 6320db4a1d0722a4e2069e661381ad75e9889786 -F ext/fts5/fts5.c 3c920d090b1cdbc69ba03acf7c9302a19be55cee +F ext/fts5/fts5.c b3a2574be6921512133d228a922bc0bfb221c569 F ext/fts5/fts5.h 72fc1e9995b1ddc254a487b9528614a83bd3dfb6 -F ext/fts5/fts5Int.h 63daceb6e421b9066e05c4e89651f27fa675be93 +F ext/fts5/fts5Int.h a466dd67c909ac05ce8330acf13c7c5bfd244e15 F ext/fts5/fts5_aux.c 0e3e5fea6bf5772805afe14c95cb5f16e03e4b3f -F ext/fts5/fts5_buffer.c 248c61ac9fec001602efc72a45704f3b8d367c00 -F ext/fts5/fts5_config.c aae1470ca0e2125e758df5b612f26082a1dc254a +F ext/fts5/fts5_buffer.c c79d67a5a611521f1f3b9d495981f22c02ef4bdb +F ext/fts5/fts5_config.c c95d89bd3ee119681f0aeff0fa34ee9cd18fc430 F ext/fts5/fts5_expr.c d317be07d70223a6865444f17982570260b690a5 F ext/fts5/fts5_hash.c 63fa8379c5f2ac107d47c2b7d9ac04c95ef8a279 -F ext/fts5/fts5_index.c 5cb71b3922e50a23752fd6c11028acfe2f367850 -F ext/fts5/fts5_storage.c c28d1a88f45f83980eb32631c7421d7f5dd336fa +F ext/fts5/fts5_index.c 7e7023f3a29f104b44df2ca2474b296b8dfe447c +F ext/fts5/fts5_storage.c 0198c5976cefa5e8d3f1cfffa3587d0dd594fb2a F ext/fts5/fts5_tokenize.c 8360c0d1ae0d4696f3cc13f7c67a2db6011cdc5b F ext/fts5/fts5parse.y 777da8e5819f75c217982c79c29d014c293acac9 F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 @@ -598,16 +598,16 @@ F test/fts4merge3.test aab02a09f50fe6baaddc2e159c3eabc116d45fc7 F test/fts4merge4.test d895b1057a7798b67e03455d0fa50e9ea836c47b F test/fts4noti.test 524807f0c36d49deea7920cdd4cd687408b58849 F test/fts4unicode.test 01ec3fe2a7c3cfff3b4c0581b83caa11b33efa36 -F test/fts5aa.test fb49e2db450f9bec900b05b6a85141695d6c2255 -F test/fts5ab.test 32ad48ca5317548dc6934585f6071b5e7ff03e61 -F test/fts5ac.test 3982268756a543cbf3ae508b6336f623136b754a -F test/fts5ad.test 4e2e6a71fc7465eaaa32fd6ec318e657c6e7baa9 -F test/fts5ae.test 0c0712b1430158f976fce3564adf3e3713a4a93d +F test/fts5aa.test 27c7d3c865e144a0501dcbfbd6d2ae87f77602ea +F test/fts5ab.test 52f6b9223372ff70b0edb5a3054fbd7bc7fcfefc +F test/fts5ac.test 60302196b7711176ce872fe2e4c73c75ac2c4038 +F test/fts5ad.test ed60fdafc73d879b42573abcfa6ede7e02e07c19 +F test/fts5ae.test 6decf7634acd161af9583ce32ab7197b0113c5cd F test/fts5af.test d24e3b0f879998ef5f60087272f8ab7b3a8fd4dc F test/fts5ag.test 1c6c188d1bdc41b2277db3f4ddfea7d90bf44ceb -F test/fts5ah.test c79b5107c2a47096f0e3473a4806ebc17f006cf4 +F test/fts5ah.test 788e923e60b5e7a559f672cfbf262b8b260ea176 F test/fts5ai.test aa2b5fd0f8d2cf59ac0211111e63cbca3b40ed7d -F test/fts5aj.test 947c957cdcfc8af7d428f8b82e82926b3b45a504 +F test/fts5aj.test bc3d91bd012c7ca175cdf266c2074920bb5fa5ba F test/fts5ak.test e55bb0f3fac1291d32bc9485a3ee55a7d76f4d5f F test/fts5al.test 455b2bdc9f6ffb965a38a970a60c5075ee1e23bb F test/fts5ea.test afaf3497b43add578384dc1fd26b0342738abe87 @@ -1206,7 +1206,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 059092379f981eb919b500ce447006f9e645fc5a -R 4ec91e9a7d6238c87465b8e2b7986d2c +P 83491c56661ca78f96020ba68184bb3fb19e674f +R 14f6d2fef178e1939a8a8ad40901ad6e U dan -Z 1dea62df28b08fe11d603550a65329e7 +Z bcf001d05010ed5ade28bb9d53b64e80 diff --git a/manifest.uuid b/manifest.uuid index 54ffb9092..2e718d56b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -83491c56661ca78f96020ba68184bb3fb19e674f
\ No newline at end of file +bb4a37b53de60da9ec8b9317eec14afa99690828
\ No newline at end of file diff --git a/test/fts5aa.test b/test/fts5aa.test index 9c715bfd4..b9440c5c9 100644 --- a/test/fts5aa.test +++ b/test/fts5aa.test @@ -85,7 +85,7 @@ foreach {i x y} { reset_db do_execsql_test 4.0 { CREATE VIRTUAL TABLE t1 USING fts5(x,y); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } foreach {i x y} { 1 {g f d b f} {h h e i a} @@ -109,7 +109,7 @@ foreach {i x y} { reset_db do_execsql_test 5.0 { CREATE VIRTUAL TABLE t1 USING fts5(x,y); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } foreach {i x y} { 1 {dd abc abc abc abcde} {aaa dd ddd ddd aab} @@ -134,7 +134,7 @@ breakpoint reset_db do_execsql_test 6.0 { CREATE VIRTUAL TABLE t1 USING fts5(x,y); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } do_execsql_test 6.1 { @@ -152,7 +152,7 @@ reset_db expr srand(0) do_execsql_test 7.0 { CREATE VIRTUAL TABLE t1 USING fts5(x,y,z); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } proc doc {} { @@ -191,7 +191,7 @@ for {set i 1} {$i <= 10} {incr i} { reset_db do_execsql_test 8.0 { CREATE VIRTUAL TABLE t1 USING fts5(x, prefix="1,2,3"); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } do_execsql_test 8.1 { @@ -208,7 +208,7 @@ expr srand(0) do_execsql_test 9.0 { CREATE VIRTUAL TABLE t1 USING fts5(x,y,z, prefix="1,2,3"); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } proc doc {} { diff --git a/test/fts5ab.test b/test/fts5ab.test index 2fd3c047c..88b869278 100644 --- a/test/fts5ab.test +++ b/test/fts5ab.test @@ -59,7 +59,7 @@ do_execsql_test 1.6 { reset_db do_execsql_test 2.1 { CREATE VIRTUAL TABLE t1 USING fts5(x); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); INSERT INTO t1 VALUES('one'); INSERT INTO t1 VALUES('two'); INSERT INTO t1 VALUES('three'); @@ -99,7 +99,7 @@ foreach {tn expr res} { reset_db do_execsql_test 3.0 { CREATE VIRTUAL TABLE t1 USING fts5(a,b); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } foreach {tn a b} { diff --git a/test/fts5ac.test b/test/fts5ac.test index f3efa1410..1b56c8b0e 100644 --- a/test/fts5ac.test +++ b/test/fts5ac.test @@ -25,7 +25,7 @@ ifcapable !fts5 { do_execsql_test 1.0 { CREATE VIRTUAL TABLE xx USING fts5(x,y); - INSERT INTO xx(xx, rowid) VALUES('pgsz', 32); + INSERT INTO xx(xx, rank) VALUES('pgsz', 32); } set data { diff --git a/test/fts5ad.test b/test/fts5ad.test index 8eabb7b97..9514e996c 100644 --- a/test/fts5ad.test +++ b/test/fts5ad.test @@ -55,12 +55,12 @@ foreach {tn match res} { foreach {T create} { 2 { CREATE VIRTUAL TABLE t1 USING fts5(a, b); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } 3 { CREATE VIRTUAL TABLE t1 USING fts5(a, b, prefix=1,2,3,4,5); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } } { diff --git a/test/fts5ae.test b/test/fts5ae.test index c29ec499e..57b91452a 100644 --- a/test/fts5ae.test +++ b/test/fts5ae.test @@ -25,7 +25,7 @@ ifcapable !fts5 { do_execsql_test 1.0 { CREATE VIRTUAL TABLE t1 USING fts5(a, b); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 32); + INSERT INTO t1(t1, rank) VALUES('pgsz', 32); } do_execsql_test 1.1 { diff --git a/test/fts5ah.test b/test/fts5ah.test index 7ee6de973..b1dffc78f 100644 --- a/test/fts5ah.test +++ b/test/fts5ah.test @@ -28,7 +28,7 @@ ifcapable !fts5 { do_test 1.0 { execsql { CREATE VIRTUAL TABLE t1 USING fts5(a) } - execsql { INSERT INTO t1(t1, rowid) VALUES('pgsz', 128) } + execsql { INSERT INTO t1(t1, rank) VALUES('pgsz', 128) } for {set i 1} {$i <= 10000} {incr i} { set v {x x x x x x x x x x x x x x x x x x x x} if {($i % 2139)==0} {lset v 3 Y ; lappend Y $i} @@ -71,7 +71,7 @@ do_test 1.5 { set bwd [execsql_reads { SELECT rowid FROM t1 WHERE t1 MATCH 'x' ORDER BY 1 ASC }] - expr {$bwd < $fwd + 10} + expr {$bwd < $fwd + 12} } {1} foreach {tn q res} " diff --git a/test/fts5aj.test b/test/fts5aj.test index 6c8cd1827..49386f57b 100644 --- a/test/fts5aj.test +++ b/test/fts5aj.test @@ -46,7 +46,7 @@ proc structure {} { expr srand(0) do_execsql_test 1.0 { CREATE VIRTUAL TABLE t1 USING fts5(x); - INSERT INTO t1(t1, rowid) VALUES('pgsz', 64); + INSERT INTO t1(t1, rank) VALUES('pgsz', 64); } for {set iTest 0} {$iTest < 50000} {incr iTest} { |