/ Check-in [a8927d14]
Login

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

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a8927d14f88c44828e794787bab080455ab62705c93f65ce7d8db83478aa5a8e
User & Date: drh 2019-09-13 12:24:58
Context
2019-09-13
13:23
Ensure that the idxStr for FTS5 is always zero-terminated. Fix for check-in [9d418a7a491761ee] check-in: 090cd07d user: drh tags: trunk
12:24
Fix harmless compiler warnings. check-in: a8927d14 user: drh tags: trunk
2019-09-12
19:38
Allow fts5 to filter on multiple MATCH clauses in a single scan. check-in: 9d418a7a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_main.c.

  1171   1171   ){
  1172   1172     Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
  1173   1173     Fts5Config *pConfig = pTab->p.pConfig;
  1174   1174     Fts5Cursor *pCsr = (Fts5Cursor*)pCursor;
  1175   1175     int rc = SQLITE_OK;             /* Error code */
  1176   1176     int bDesc;                      /* True if ORDER BY [rank|rowid] DESC */
  1177   1177     int bOrderByRank;               /* True if ORDER BY rank */
  1178         -  sqlite3_value *pMatch = 0;      /* <tbl> MATCH ? expression (or NULL) */
  1179   1178     sqlite3_value *pRank = 0;       /* rank MATCH ? expression (or NULL) */
  1180   1179     sqlite3_value *pRowidEq = 0;    /* rowid = ? expression (or NULL) */
  1181   1180     sqlite3_value *pRowidLe = 0;    /* rowid <= ? expression (or NULL) */
  1182   1181     sqlite3_value *pRowidGe = 0;    /* rowid >= ? expression (or NULL) */
  1183   1182     int iCol;                       /* Column on LHS of MATCH operator */
  1184   1183     char **pzErrmsg = pConfig->pzErrmsg;
  1185   1184     int i;
................................................................................
  1205   1204     /* Decode the arguments passed through to this function. */
  1206   1205     for(i=0; i<nVal; i++){
  1207   1206       switch( idxStr[iIdxStr++] ){
  1208   1207         case 'r':
  1209   1208           pRank = apVal[i];
  1210   1209           break;
  1211   1210         case 'm': {
  1212         -        char *zText = sqlite3_value_text(apVal[i]);
         1211  +        const char *zText = (const char*)sqlite3_value_text(apVal[i]);
  1213   1212           if( zText==0 ) zText = "";
  1214   1213   
  1215   1214           if( idxStr[iIdxStr]>='0' && idxStr[iIdxStr]<='9' ){
  1216   1215             iCol = 0;
  1217   1216             do{
  1218   1217               iCol = iCol*10 + (idxStr[iIdxStr]-'0');
  1219   1218               iIdxStr++;
................................................................................
  1273   1272       /* If pSortCsr is non-NULL, then this call is being made as part of 
  1274   1273       ** processing for a "... MATCH <expr> ORDER BY rank" query (ePlan is
  1275   1274       ** set to FTS5_PLAN_SORTED_MATCH). pSortCsr is the cursor that will
  1276   1275       ** return results to the user for this query. The current cursor 
  1277   1276       ** (pCursor) is used to execute the query issued by function 
  1278   1277       ** fts5CursorFirstSorted() above.  */
  1279   1278       assert( pRowidEq==0 && pRowidLe==0 && pRowidGe==0 && pRank==0 );
  1280         -    assert( nVal==0 && pMatch==0 && bOrderByRank==0 && bDesc==0 );
         1279  +    assert( nVal==0 && bOrderByRank==0 && bDesc==0 );
  1281   1280       assert( pCsr->iLastRowid==LARGEST_INT64 );
  1282   1281       assert( pCsr->iFirstRowid==SMALLEST_INT64 );
  1283   1282       if( pTab->pSortCsr->bDesc ){
  1284   1283         pCsr->iLastRowid = pTab->pSortCsr->iFirstRowid;
  1285   1284         pCsr->iFirstRowid = pTab->pSortCsr->iLastRowid;
  1286   1285       }else{
  1287   1286         pCsr->iLastRowid = pTab->pSortCsr->iLastRowid;