if( p->rc!=SQLITE_OK ) return;
if( p->pWriter==0 ){
- int rc = SQLITE_OK;
Fts5Config *pConfig = p->pConfig;
fts5IndexPrepareStmt(p, &p->pWriter, sqlite3_mprintf(
"REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)",
Fts5Structure *pRet = 0; /* Object to return */
int iCookie; /* Configuration cookie */
Fts5Data *pData;
- Fts5Buffer buf = {0, 0, 0};
pData = fts5DataRead(p, FTS5_STRUCTURE_ROWID);
if( p->rc ) return 0;
return pIter->aLvl[0].iLeafPgno;
}
-static void fts5LeafHeader(Fts5Data *pLeaf, int *piRowid, int *piTerm){
- *piRowid = (int)fts5GetU16(&pLeaf->p[0]);
- *piTerm = (int)fts5GetU16(&pLeaf->p[2]);
-}
-
/*
** Load the next leaf page into the segment iterator.
*/
fts5DataRelease(pIter->pLeaf);
pIter->pLeaf = 0;
}else{
- int nExtra;
fts5SegIterLoadTerm(p, pIter, nKeep);
fts5SegIterLoadNPos(p, pIter);
if( pbNewTerm ) *pbNewTerm = 1;
pgnoLast = fts5DlidxIterPgno(pDlidx);
pLast = fts5DataRead(p, FTS5_SEGMENT_ROWID(iSegid, pgnoLast));
}else{
- int iOff; /* Byte offset within pLeaf */
Fts5Data *pLeaf = pIter->pLeaf; /* Current leaf data */
- /* Currently, Fts5SegIter.iLeafOffset (and iOff) points to the first
- ** byte of position-list content for the current rowid. Back it up
- ** so that it points to the start of the position-list size field. */
+ /* Currently, Fts5SegIter.iLeafOffset points to the first byte of
+ ** position-list content for the current rowid. Back it up so that it
+ ** points to the start of the position-list size field. */
pIter->iLeafOffset -= sqlite3Fts5GetVarintLen(pIter->nPos*2+pIter->bDel);
/* If this condition is true then the largest rowid for the current
int nMatch = 0;
int nKeep = 0;
int nNew = 0;
- int iTerm = 0;
int iTermOff;
int iPgidx; /* Current offset in pgidx */
int bEndOfPage = 0;
return;
}else if( bEndOfPage ){
do {
- iTerm = 0;
fts5SegIterNextPage(p, pIter);
if( pIter->pLeaf==0 ) return;
a = pIter->pLeaf->p;
}
}
-static void fts5WriteAppendZerobyte(Fts5Index *p, Fts5SegWriter *pWriter){
- fts5BufferAppendVarint(&p->rc, &pWriter->writer.buf, 0);
-}
-
/*
** Flush any data cached by the writer object to the database. Free any
** allocations associated with the writer.
Fts5SegWriter writer; /* Writer object */
Fts5StructureSegment *pSeg; /* Output segment */
Fts5Buffer term;
- int bRequireDoclistTerm = 0; /* Doclist terminator (0x00) required */
int bOldest; /* True if the output segment is the oldest */
assert( iLvl<pStruct->nLevel );
}
/* This is a new term. Append a term to the output segment. */
- /* TODO2: Doclist 0x00 term */
- if( bRequireDoclistTerm ){
- /* fts5WriteAppendZerobyte(p, &writer); */
- }
fts5WriteAppendTerm(p, &writer, nTerm, pTerm);
fts5BufferSet(&p->rc, &term, nTerm, pTerm);
- bRequireDoclistTerm = 1;
}
/* Append the rowid to the output */
Fts5StructureSegment *pSeg; /* New segment within pStruct */
Fts5Buffer *pBuf; /* Buffer in which to assemble leaf page */
Fts5Buffer *pPgidx; /* Buffer in which to assemble pgidx */
- const u8 *zPrev = 0;
Fts5SegWriter writer;
fts5WriteInit(p, &writer, iSegid);
const char *zTerm; /* Buffer containing term */
const u8 *pDoclist; /* Pointer to doclist for this term */
int nDoclist; /* Size of doclist in bytes */
- int nSuffix; /* Size of term suffix */
/* Write the term for this entry to disk. */
sqlite3Fts5HashScanEntry(pHash, &zTerm, &pDoclist, &nDoclist);
- fts5WriteAppendTerm(p, &writer, strlen(zTerm), zTerm);
+ fts5WriteAppendTerm(p, &writer, strlen(zTerm), (const u8*)zTerm);
if( writer.bFirstRowidInPage==0
&& pgsz>=(pBuf->n + pPgidx->n + nDoclist + 1)
/* TODO2: Doclist terminator written here. */
/* pBuf->p[pBuf->n++] = '\0'; */
assert( pBuf->n<=pBuf->nSpace );
- zPrev = (const u8*)zTerm;
sqlite3Fts5HashScanNext(pHash);
}
sqlite3Fts5HashClear(pHash);
}
static void fts5IntegrityCheckPgidx(Fts5Index *p, Fts5Data *pLeaf){
- int nPg = (pLeaf->nn - pLeaf->szLeaf) / 2;
int iTermOff = 0;
int ii;
zArg = (const char*)sqlite3_value_text(apVal[0]);
if( 0==sqlite3_stricmp(zArg, "segment") ){
i64 iRowid;
- int segid, height, pgno;
+ int segid, pgno;
if( nArg!=3 ){
sqlite3_result_error(pCtx,
"should be: fts5_rowid('segment', segid, pgno))", -1
-C Updates\sto\sthe\ssqlite3_value_subtype()\sand\ssqlite3_result_subtype()\ndocumentation\sand\sto\stest\scases\sfor\sjson1\sdealing\swith\sthose\sinterfaces.
-D 2015-09-11T01:22:41.498
+C Fix\ssome\scompiler\swarnings\sin\sfts5\scode.
+D 2015-09-11T14:15:46.470
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95
F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0
F ext/fts5/fts5.h f04659e0df5af83731b102189a32280f74f4a6bc
-F ext/fts5/fts5Int.h 81ba5e474979b166a52a8be306aa3b09d43a10e9
+F ext/fts5/fts5Int.h 666aba8432940a8449a3bd4636e898fe906ed95d
F ext/fts5/fts5_aux.c 7a307760a9c57c750d043188ec0bad59f5b5ec7e
F ext/fts5/fts5_buffer.c 64dcaf36a3ebda9e84b7c3b8788887ec325e12a4
F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695
-F ext/fts5/fts5_expr.c a7726fe7045eec7caca8a074af747c8ea3545b83
+F ext/fts5/fts5_expr.c 667faaf14a69a5683ac383acdc8d942cf32c3f93
F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246
-F ext/fts5/fts5_index.c 093e2e5936dab536cbe3e321bf4b53dda2b40547
-F ext/fts5/fts5_main.c 4b04c934084ea24a858438a04b5be8af3a9e0311
+F ext/fts5/fts5_index.c c07522cc5632d0d211402c0e6273ecb7493886d4
+F ext/fts5/fts5_main.c 3fa906f6c0177caf8f82862bc70f37b28bb3305c
F ext/fts5/fts5_storage.c 120f7b143688b5b7710dacbd48cff211609b8059
F ext/fts5/fts5_tcl.c 6da58d6e8f42a93c4486b5ba9b187a7f995dee37
F ext/fts5/fts5_test_mi.c e96be827aa8f571031e65e481251dc1981d608bf
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P db4152aef2253ed2a33e3cad01e0c6758e03f900
-R 1bba7f6a951d63c0429f61e7df8f5c7d
-U drh
-Z 186760bb5fa5f9976b74dfde02dde033
+P d6cadbe9fefce9a7af6b2d0cb83362f967d7d89a
+R 142f8055af436e9c39db41b2b1d79675
+U dan
+Z 56f93ac2844adc1c45e33937963b4c3d