/ Check-in [27ea783b]
Login

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

Overview
Comment:Remove an unused variable from FTS4.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 27ea783b281606196ad1e7e6e6dcbd80c75d4bafcf3e58756a71c213320e4db2
User & Date: drh 2018-02-13 16:30:19
Context
2018-02-13
18:48
Fix an incorrect table lookup used to find the appropriate search operator for a WHERE clause on a row-value inequality. The incorrect table lookup was causing an incorrect answer for the less-than operator. Fix for ticket [f484b65f3d6230593c34f11] check-in: f3112e67 user: drh tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_write.c.

  5525   5525     sqlite3_vtab *pVtab,            /* FTS3 vtab object */
  5526   5526     int nArg,                       /* Size of argument array */
  5527   5527     sqlite3_value **apVal,          /* Array of arguments */
  5528   5528     sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */
  5529   5529   ){
  5530   5530     Fts3Table *p = (Fts3Table *)pVtab;
  5531   5531     int rc = SQLITE_OK;             /* Return Code */
  5532         -  int isRemove = 0;               /* True for an UPDATE or DELETE */
  5533   5532     u32 *aSzIns = 0;                /* Sizes of inserted documents */
  5534   5533     u32 *aSzDel = 0;                /* Sizes of deleted documents */
  5535   5534     int nChng = 0;                  /* Net change in number of documents */
  5536   5535     int bInsertDone = 0;
  5537   5536   
  5538   5537     /* At this point it must be known if the %_stat table exists or not.
  5539   5538     ** So bHasStat may not be 2.  */
................................................................................
  5623   5622       goto update_out;
  5624   5623     }
  5625   5624   
  5626   5625     /* If this is a DELETE or UPDATE operation, remove the old record. */
  5627   5626     if( sqlite3_value_type(apVal[0])!=SQLITE_NULL ){
  5628   5627       assert( sqlite3_value_type(apVal[0])==SQLITE_INTEGER );
  5629   5628       rc = fts3DeleteByRowid(p, apVal[0], &nChng, aSzDel);
  5630         -    isRemove = 1;
  5631   5629     }
  5632   5630     
  5633   5631     /* If this is an INSERT or UPDATE operation, insert the new record. */
  5634   5632     if( nArg>1 && rc==SQLITE_OK ){
  5635   5633       int iLangid = sqlite3_value_int(apVal[2 + p->nColumn + 2]);
  5636   5634       if( bInsertDone==0 ){
  5637   5635         rc = fts3InsertData(p, apVal, pRowid);