/ Check-in [57a60e95]
Login

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

Overview
Comment:Fix harmless compiler warnings in FTS5.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 57a60e959c198b87ed29fab14356f89e0ea7cdb1dd99adbea45b40e8d0cb310a
User & Date: mistachkin 2017-05-24 15:32:44
Context
2017-05-25
00:08
The TK_IF_NULL_ROW expression node must be treated as a variable that references the table Expr.iTable. Proposed fix for ticket [7fde638e94287d2c]. check-in: 77fc2301 user: drh tags: trunk
2017-05-24
15:32
Fix harmless compiler warnings in FTS5. check-in: 57a60e95 user: mistachkin tags: trunk
04:18
Fix a problem in STAT4 equality estimation for multi-column indexes introduced by check-in [3e0590dee0e68cc1599]. check-in: cfb0d9e0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_hash.c.

   167    167   
   168    168     apNew = (Fts5HashEntry**)sqlite3_malloc(nNew*sizeof(Fts5HashEntry*));
   169    169     if( !apNew ) return SQLITE_NOMEM;
   170    170     memset(apNew, 0, nNew*sizeof(Fts5HashEntry*));
   171    171   
   172    172     for(i=0; i<pHash->nSlot; i++){
   173    173       while( apOld[i] ){
   174         -      int iHash;
          174  +      unsigned int iHash;
   175    175         Fts5HashEntry *p = apOld[i];
   176    176         apOld[i] = p->pHashNext;
   177         -      iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p), strlen(fts5EntryKey(p)));
          177  +      iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p),
          178  +                          (int)strlen(fts5EntryKey(p)));
   178    179         p->pHashNext = apNew[iHash];
   179    180         apNew[iHash] = p;
   180    181       }
   181    182     }
   182    183   
   183    184     sqlite3_free(apOld);
   184    185     pHash->nSlot = nNew;
................................................................................
   473    474   int sqlite3Fts5HashQuery(
   474    475     Fts5Hash *pHash,                /* Hash table to query */
   475    476     const char *pTerm, int nTerm,   /* Query term */
   476    477     const u8 **ppDoclist,           /* OUT: Pointer to doclist for pTerm */
   477    478     int *pnDoclist                  /* OUT: Size of doclist in bytes */
   478    479   ){
   479    480     unsigned int iHash = fts5HashKey(pHash->nSlot, (const u8*)pTerm, nTerm);
   480         -  char *zKey;
          481  +  char *zKey = 0;
   481    482     Fts5HashEntry *p;
   482    483   
   483    484     for(p=pHash->aSlot[iHash]; p; p=p->pHashNext){
   484    485       zKey = fts5EntryKey(p);
   485    486       if( memcmp(zKey, pTerm, nTerm)==0 && zKey[nTerm]==0 ) break;
   486    487     }
   487    488   

Changes to ext/fts5/fts5_test_tok.c.

   178    178     sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
   179    179     char **pzErr                    /* OUT: sqlite3_malloc'd error message */
   180    180   ){
   181    181     fts5_api *pApi = (fts5_api*)pCtx;
   182    182     Fts5tokTable *pTab = 0;
   183    183     int rc;
   184    184     char **azDequote = 0;
   185         -  int nDequote;
          185  +  int nDequote = 0;
   186    186   
   187    187     rc = sqlite3_declare_vtab(db, 
   188    188          "CREATE TABLE x(input HIDDEN, token, start, end, position)"
   189    189     );
   190    190   
   191    191     if( rc==SQLITE_OK ){
   192    192       nDequote = argc-3;

Changes to ext/fts5/test/fts5rank.test.

    86     86     execsql { SELECT rowid FROM tt('a') ORDER BY rank; } db2
    87     87   } {1 3 2}
    88     88   
    89     89   do_test 2.7 {
    90     90     execsql { SELECT rowid FROM tt('a') ORDER BY rank; } db
    91     91   } {1 3 2}
    92     92   
           93  +db2 close
    93     94   
    94     95   #--------------------------------------------------------------------------
    95     96   # At one point there was a problem with queries such as:
    96     97   #
    97     98   #   ... MATCH 'x OR y' ORDER BY rank;
    98     99   #
    99    100   # if there were zero occurrences of token 'y' in the dataset. The