]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a problem in the fts5 integrity-check.
authordan <dan@noemail.net>
Sat, 4 Jul 2015 15:35:02 +0000 (15:35 +0000)
committerdan <dan@noemail.net>
Sat, 4 Jul 2015 15:35:02 +0000 (15:35 +0000)
FossilOrigin-Name: 4e473559c9bdcf4d0b823e995a3642cd50ebd337

ext/fts5/fts5_index.c
manifest
manifest.uuid

index 6b3dbe064183f26b0cdccf685201f788df260699..d29ee04a152743b3bb50d45d632c9963ff4e08f2 100644 (file)
@@ -4828,7 +4828,6 @@ static void fts5TestTerm(
     int nTerm = pPrev->n-1;            /* Size of zTerm in bytes */
     int iIdx = (pPrev->p[0] - FTS5_MAIN_PREFIX);
     int flags = (iIdx==0 ? 0 : FTS5INDEX_QUERY_PREFIX);
-    int rc;
     u64 ck1 = 0;
     u64 ck2 = 0;
 
@@ -5054,6 +5053,9 @@ int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum){
     i64 iRowid = fts5MultiIterRowid(pIter);
     char *z = (char*)fts5MultiIterTerm(pIter, &n);
 
+    /* If this is a new term, query for it. Update cksum3 with the results. */
+    fts5TestTerm(p, &term, z, n, cksum2, &cksum3);
+
     poslist.n = 0;
     fts5MultiIterPoslist(p, pIter, 0, &poslist);
     while( 0==sqlite3Fts5PoslistNext64(poslist.p, poslist.n, &iOff, &iPos) ){
@@ -5061,9 +5063,6 @@ int sqlite3Fts5IndexIntegrityCheck(Fts5Index *p, u64 cksum){
       int iTokOff = FTS5_POS2OFFSET(iPos);
       cksum2 ^= fts5IndexEntryCksum(iRowid, iCol, iTokOff, -1, z, n);
     }
-
-    /* If this is a new term, query for it. Update cksum3 with the results. */
-    fts5TestTerm(p, &term, z, n, cksum2, &cksum3);
   }
   fts5TestTerm(p, &term, 0, 0, cksum2, &cksum3);
 
index 786e403a09f3cb398a37ccf45a8c2c88279aff34..52014a9ab7338f910acc20de982aa4acb021bde0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Do\snot\spreserve\sthe\sbtreeInitPage()\sresults\sin\sPRAGMA\sintegrity_check\sif\nthere\swere\scell\ssizing\serrors\sbecause\sPRAGMA\scell_size_check\swas\sturned\soff\nduring\sthe\sbtreeInitPage()\scall.
-D 2015-07-04T11:14:20.284
+C Fix\sa\sproblem\sin\sthe\sfts5\sintegrity-check.
+D 2015-07-04T15:35:02.267
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 017bf0511d1b2dd1db5e16488fbf75a17b526cbc
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -112,7 +112,7 @@ F ext/fts5/fts5_buffer.c 80f9ba4431848cb857e3d2158f5280093dcd8015
 F ext/fts5/fts5_config.c b2456e9625bca41c51d54c363e369c6356895c90
 F ext/fts5/fts5_expr.c d2e148345639c5a5583e0daa39a639bf298ae6a7
 F ext/fts5/fts5_hash.c 219f4edd72e5cf95b19c33f1058809a18fad5229
-F ext/fts5/fts5_index.c 50f137bc97ae8c28ea555e156a01a155601cf0ff
+F ext/fts5/fts5_index.c 6564c103148e8b59d6b816f34d0b31f5f4025054
 F ext/fts5/fts5_main.c 37b0055cb4036c4b4bb4eb36e30ebd1c21c63939
 F ext/fts5/fts5_storage.c 4cae85b5287b159d9d98174a4e70adf872b0930a
 F ext/fts5/fts5_tcl.c 85eb4e0d0fefa9420b78151496ad4599a1783e20
@@ -1364,7 +1364,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 43ead44ef6416d69602e123c3be7a258772837f1
-R a66ab7da98093b47fcf696f0e3baef91
-U drh
-Z 85e64a90850a0b5ecb5f23fb7b4db837
+P 743bf1f184be316971f2e9c651bcf573bde8654a
+R 9bf7551534e5c2a541b49f913ee30aa3
+U dan
+Z 59b496d519385223221d6df6daef9f3a
index 6c31177c163b131bcecf4785d50dfc9db2819b44..0ee45a678c819d23d58f095f074445167c62a8ae 100644 (file)
@@ -1 +1 @@
-743bf1f184be316971f2e9c651bcf573bde8654a
\ No newline at end of file
+4e473559c9bdcf4d0b823e995a3642cd50ebd337
\ No newline at end of file