/ Check-in [d2a81a37]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure that multiple updates of the same FTS4 row (i.e. the row with the same rowid) within a single transaction are written to separate segments. Fix for [d6ec09ec].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d2a81a3752a8298ee65fddcf32dee2147ba6467f770315a41966b3533977aa64
User & Date: dan 2018-02-13 16:21:32
Context
2018-02-13
16:30
Remove an unused variable from FTS4. check-in: 27ea783b user: drh tags: trunk
16:21
Ensure that multiple updates of the same FTS4 row (i.e. the row with the same rowid) within a single transaction are written to separate segments. Fix for [d6ec09ec]. check-in: d2a81a37 user: dan tags: trunk
2018-02-12
20:50
Updates to the speed-check.sh script for improvements to the --vdbeprofile option. check-in: f89c8f8e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_write.c.

  5635   5635       int iLangid = sqlite3_value_int(apVal[2 + p->nColumn + 2]);
  5636   5636       if( bInsertDone==0 ){
  5637   5637         rc = fts3InsertData(p, apVal, pRowid);
  5638   5638         if( rc==SQLITE_CONSTRAINT && p->zContentTbl==0 ){
  5639   5639           rc = FTS_CORRUPT_VTAB;
  5640   5640         }
  5641   5641       }
  5642         -    if( rc==SQLITE_OK && (!isRemove || *pRowid!=p->iPrevDocid ) ){
         5642  +    if( rc==SQLITE_OK ){
  5643   5643         rc = fts3PendingTermsDocid(p, 0, iLangid, *pRowid);
  5644   5644       }
  5645   5645       if( rc==SQLITE_OK ){
  5646   5646         assert( p->iPrevDocid==*pRowid );
  5647   5647         rc = fts3InsertTerms(p, iLangid, apVal, aSzIns);
  5648   5648       }
  5649   5649       if( p->bHasDocsize ){

Changes to test/fts4onepass.test.

   138    138       do_execsql_test  3.$tn.$tn2.b { SELECT rowid, content FROM ft2 } $content
   139    139       do_execsql_test  3.$tn.$tn2.c { 
   140    140         INSERT INTO ft2(ft2) VALUES('integrity-check');
   141    141       }
   142    142     }
   143    143     eval $tcl2
   144    144   }
          145  +
          146  +do_execsql_test 4.0 {
          147  +  CREATE VIRTUAL TABLE zt USING fts4(a, b);
          148  +  INSERT INTO zt(rowid, a, b) VALUES(1, 'unus duo', NULL);
          149  +  INSERT INTO zt(rowid, a, b) VALUES(2, NULL, NULL);
          150  +
          151  +  BEGIN;
          152  +    UPDATE zt SET b='septum' WHERE rowid = 1;
          153  +    UPDATE zt SET b='octo' WHERE rowid = 1;
          154  +  COMMIT;
          155  +
          156  +  SELECT count(*) FROM zt_segdir;
          157  +} {3}
          158  +
   145    159   
   146    160   finish_test