Compare commits

...

1 Commits

Author SHA1 Message Date
dan 39e4c24e78 Do the accounting for incr-merge work in pages instead of blocks.
FossilOrigin-Name: 83037d58443ab1caa93db228f33180a30a16554f
2012-03-28 18:08:06 +00:00
4 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ struct Fts3Table {
char *zContentTbl; /* content=xxx option, or NULL */
char *zLanguageid; /* languageid=xxx option, or NULL */
u8 bAutoincrmerge; /* True if automerge=1 */
u32 nLeafAdd; /* Number of leaf blocks added this trans */
u32 nLeafAdd; /* Number of leaf pages added this trans */
/* Precompiled statements used by the implementation. Each of these
** statements is run and reset within a single virtual table API call.
+3 -2
View File
@@ -2211,7 +2211,7 @@ static int fts3SegWriterAdd(
/* The current leaf node is full. Write it out to the database. */
rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);
if( rc!=SQLITE_OK ) return rc;
p->nLeafAdd++;
p->nLeafAdd += ((nData / p->nPgsz) + 1);
/* Add the current term to the interior node tree. The term added to
** the interior tree must:
@@ -2319,6 +2319,7 @@ static int fts3SegWriterFlush(
/* The entire tree fits on the root node. Write it to the segdir table. */
rc = fts3WriteSegdir(
p, iLevel, iIdx, 0, 0, 0, pWriter->aData, pWriter->nData);
p->nLeafAdd += (pWriter->nData / p->nPgsz);
}
p->nLeafAdd++;
return rc;
@@ -3716,7 +3717,7 @@ static int fts3IncrmergeAppend(
** bytes, write this block out to the database. */
if( pLeaf->block.n>0 && (pLeaf->block.n + nSpace)>p->nNodeSize ){
rc = fts3WriteSegment(p, pLeaf->iBlock, pLeaf->block.a, pLeaf->block.n);
pWriter->nWork++;
pWriter->nWork += 1 + (pLeaf->block.n / p->nPgsz);
/* Add the current term to the parent node. The term added to the
** parent must:
+11 -8
View File
@@ -1,5 +1,5 @@
C Merge\sin\sthe\slatest\schanges\sfrom\strunk.
D 2012-03-28T16:44:13.607
C Do\sthe\saccounting\sfor\sincr-merge\swork\sin\spages\sinstead\sof\sblocks.
D 2012-03-28T18:08:06.732
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -65,7 +65,7 @@ F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c f41f52a24f1a9d7f94291a0e17027e0c28e4f54b
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h 5fd2ec4e47faf17bf4a508d6b8ec5fc0f2c80bff
F ext/fts3/fts3Int.h d03b8cf010a452ffa3e000bd1d7aa34c93808b47
F ext/fts3/fts3_aux.c 5205182bd8f372782597888156404766edf5781e
F ext/fts3/fts3_expr.c dbc7ba4c3a6061adde0f38ed8e9b349568299551
F ext/fts3/fts3_hash.c 8dd2d06b66c72c628c2732555a32bc0943114914
@@ -78,7 +78,7 @@ F ext/fts3/fts3_test.c 6b7cc68aef4efb084e1449f7d20c4b20d3bdf6b4
F ext/fts3/fts3_tokenizer.c 3da7254a9881f7e270ab28e2004e0d22b3212bce
F ext/fts3/fts3_tokenizer.h 66dec98e365854b6cd2d54f1a96bb6d428fc5a68
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
F ext/fts3/fts3_write.c ceb65d6a85f44c7dd1d96f12d04e20f75884bfe3
F ext/fts3/fts3_write.c bd0d354b51b1d7a17d47e55af76921c48778123c
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
F ext/fts3/tool/fts3view.c 6cfc5b67a5f0e09c0d698f9fd012c784bfaa9197
@@ -999,7 +999,10 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P 64fc8b30f8bc7ddc697b6042040e958787ff3118 0733c98c329bc9942460746e9bbaf4b4c94c1520
R 7c6a56a142b783bc5a39759c4e6db58f
U drh
Z b8266c3b3b198b8b23ee6f1eee86b3bc
P 66c4aaadda433c9d479a25c27cdff84560088402
R 3c315eaca67c445198b0cee860ef9677
T *branch * fts4-incr-merge-exp
T *sym-fts4-incr-merge-exp *
T -sym-fts4-incr-merge *
U dan
Z 224c2b8f88f408ef415d4975f0516879
+1 -1
View File
@@ -1 +1 @@
66c4aaadda433c9d479a25c27cdff84560088402
83037d58443ab1caa93db228f33180a30a16554f