/ Check-in [2dde3375]
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
SHA1: 2dde3375124198560c8ff15f87aadde2afd722c5
User & Date: drh 2016-10-05 20:10:32
Context
2016-10-05
20:14
Fix some compiler warnings in fts5. check-in: b066637b user: dan tags: trunk
20:10
Fix harmless compiler warnings. check-in: 2dde3375 user: drh tags: trunk
15:04
Add a test case for the fix in [a596b7c6cc]. check-in: b2ef39b1 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

   647    647         int is_agg = 0;             /* True if is an aggregate function */
   648    648         int nId;                    /* Number of characters in function name */
   649    649         const char *zId;            /* The function name. */
   650    650         FuncDef *pDef;              /* Information about the function */
   651    651         u8 enc = ENC(pParse->db);   /* The database encoding */
   652    652   
   653    653         assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
   654         -//      notValid(pParse, pNC, "functions", NC_PartIdx);
   655    654         zId = pExpr->u.zToken;
   656    655         nId = sqlite3Strlen30(zId);
   657    656         pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0);
   658    657         if( pDef==0 ){
   659    658           pDef = sqlite3FindFunction(pParse->db, zId, -2, enc, 0);
   660    659           if( pDef==0 ){
   661    660             no_such_func = 1;

Changes to src/wherecode.c.

   357    357   ** to the pRight values. This function modifies characters within the
   358    358   ** affinity string to SQLITE_AFF_BLOB if either:
   359    359   **
   360    360   **   * the comparison will be performed with no affinity, or
   361    361   **   * the affinity change in zAff is guaranteed not to change the value.
   362    362   */
   363    363   static void updateRangeAffinityStr(
   364         -  Parse *pParse,                  /* Parse context */
   365    364     Expr *pRight,                   /* RHS of comparison */
   366    365     int n,                          /* Number of vector elements in comparison */
   367    366     char *zAff                      /* Affinity string to modify */
   368    367   ){
   369    368     int i;
   370    369     for(i=0; i<n; i++){
   371    370       Expr *p = sqlite3VectorFieldSubexpr(pRight, i);
................................................................................
  1497   1496         if( (pRangeStart->wtFlags & TERM_VNULL)==0
  1498   1497          && sqlite3ExprCanBeNull(pRight)
  1499   1498         ){
  1500   1499           sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
  1501   1500           VdbeCoverage(v);
  1502   1501         }
  1503   1502         if( zStartAff ){
  1504         -        updateRangeAffinityStr(pParse, pRight, nBtm, &zStartAff[nEq]);
         1503  +        updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
  1505   1504         }  
  1506   1505         nConstraint += nBtm;
  1507   1506         testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
  1508   1507         if( sqlite3ExprIsVector(pRight)==0 ){
  1509   1508           disableTerm(pLevel, pRangeStart);
  1510   1509         }else{
  1511   1510           startEq = 1;
................................................................................
  1547   1546         if( (pRangeEnd->wtFlags & TERM_VNULL)==0
  1548   1547          && sqlite3ExprCanBeNull(pRight)
  1549   1548         ){
  1550   1549           sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
  1551   1550           VdbeCoverage(v);
  1552   1551         }
  1553   1552         if( zEndAff ){
  1554         -        updateRangeAffinityStr(pParse, pRight, nTop, zEndAff);
         1553  +        updateRangeAffinityStr(pRight, nTop, zEndAff);
  1555   1554           codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
  1556   1555         }else{
  1557   1556           assert( pParse->db->mallocFailed );
  1558   1557         }
  1559   1558         nConstraint += nTop;
  1560   1559         testcase( pRangeEnd->wtFlags & TERM_VIRTUAL );
  1561   1560