/ Check-in [d03b6113]
Login

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

Overview
Comment:Add some missing VdbeCoverage() macros.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d03b611302f68483770d49b113b4ed685ba03526d2007647c306f8ec7ae697d2
User & Date: drh 2019-03-31 18:17:00
Context
2019-03-31
21:09
Early detection of too many columns in an index avoid a possible 16-bit signed integer overflow. check-in: 8af0caeb user: drh tags: trunk
18:17
Add some missing VdbeCoverage() macros. check-in: d03b6113 user: drh tags: trunk
2019-03-30
20:43
Improvements to VdbeCoverage macros. check-in: 10ee9e33 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/window.c.

  1319   1319       VdbeCoverage(v);
  1320   1320       assert( eCond==0 || eCond==1 || eCond==2 );
  1321   1321       VdbeCoverageIf(v, eCond==0);
  1322   1322       VdbeCoverageIf(v, eCond==1);
  1323   1323       VdbeCoverageIf(v, eCond==2);
  1324   1324     }
  1325   1325     sqlite3VdbeAddOp3(v, aOp[eCond], regZero, sqlite3VdbeCurrentAddr(v)+2, reg);
  1326         -  VdbeCoverageNeverNullIf(v, eCond==0);
  1327         -  VdbeCoverageNeverNullIf(v, eCond==1);
  1328         -  VdbeCoverageNeverNullIf(v, eCond==2);
  1329         -  VdbeCoverageNeverNullIf(v, eCond==3);
  1330         -  VdbeCoverageNeverNullIf(v, eCond==4);
         1326  +  VdbeCoverageIf(v, eCond==0);
         1327  +  VdbeCoverageIf(v, eCond==1);
         1328  +  VdbeCoverageIf(v, eCond==2);
         1329  +  VdbeCoverageIf(v, eCond==3);
         1330  +  VdbeCoverageIf(v, eCond==4);
  1331   1331     sqlite3MayAbort(pParse);
  1332   1332     sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_ERROR, OE_Abort);
  1333   1333     sqlite3VdbeAppendP4(v, (void*)azErr[eCond], P4_STATIC);
  1334   1334     sqlite3ReleaseTempReg(pParse, regZero);
  1335   1335   }
  1336   1336   
  1337   1337   /*
................................................................................
  1573   1573     addrNext = sqlite3VdbeCurrentAddr(v);
  1574   1574     sqlite3VdbeAddOp2(v, OP_Rowid, csr, regRowid);
  1575   1575     sqlite3VdbeAddOp3(v, OP_Gt, pMWin->regEndRowid, lblBrk, regRowid);
  1576   1576     VdbeCoverageNeverNull(v);
  1577   1577   
  1578   1578     if( pMWin->eExclude==TK_CURRENT ){
  1579   1579       sqlite3VdbeAddOp3(v, OP_Eq, regCRowid, lblNext, regRowid);
         1580  +    VdbeCoverage(v);
  1580   1581     }else if( pMWin->eExclude!=TK_NO ){
  1581   1582       int addr;
  1582   1583       int addrEq = 0;
  1583   1584       KeyInfo *pKeyInfo = 0;
  1584   1585   
  1585   1586       if( pMWin->pOrderBy ){
  1586   1587         pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pMWin->pOrderBy, 0, 0);
  1587   1588       }
  1588   1589       if( pMWin->eExclude==TK_TIES ){
  1589   1590         addrEq = sqlite3VdbeAddOp3(v, OP_Eq, regCRowid, 0, regRowid);
         1591  +      VdbeCoverage(v);
  1590   1592       }
  1591   1593       if( pKeyInfo ){
  1592   1594         windowReadPeerValues(p, csr, regPeer);
  1593   1595         sqlite3VdbeAddOp3(v, OP_Compare, regPeer, regCPeer, nPeer);
  1594   1596         sqlite3VdbeAppendP4(v, (void*)pKeyInfo, P4_KEYINFO);
  1595   1597         addr = sqlite3VdbeCurrentAddr(v)+1;
  1596   1598         sqlite3VdbeAddOp3(v, OP_Jump, addr, lblNext, addr);