/ Check-in [fa37cf9a]
Login

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

Overview
Comment:Frame range comparisons can never be NULL because the values will have been checked for NULL prior to the test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fa37cf9a6aa3e4325674cb6af68f617d25e349c3f694d0117a19a36fc42daf15
User & Date: drh 2019-04-01 16:23:21
Context
2019-04-01
17:24
If the library is built with SQLITE_VDBE_COVERAGE defined, have the Tcl tests generate a vdbe coverage report in file testdir/vdbe_coverage.txt. check-in: f0ed7146 user: dan tags: trunk
16:23
Frame range comparisons can never be NULL because the values will have been checked for NULL prior to the test. check-in: fa37cf9a user: drh tags: trunk
15:55
Mark rowid-comparison opcodes as never-null for VDBE coverage tracking purposes. check-in: a69bb4f2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/window.c.

  2539   2539       sqlite3ExprCode(pParse, pMWin->pEnd, regEnd);
  2540   2540       windowCheckValue(pParse, regEnd, 1 + (pMWin->eFrmType==TK_RANGE ? 3 : 0));
  2541   2541     }
  2542   2542   
  2543   2543     if( pMWin->eStart==pMWin->eEnd && regStart ){
  2544   2544       int op = ((pMWin->eStart==TK_FOLLOWING) ? OP_Ge : OP_Le);
  2545   2545       int addrGe = sqlite3VdbeAddOp3(v, op, regStart, 0, regEnd);
  2546         -    VdbeCoverage(v);
  2547         -    VdbeCoverageIf(v, op==OP_Ge);
  2548         -    VdbeCoverageIf(v, op==OP_Le);
         2546  +    VdbeCoverageNeverNullIf(v, op==OP_Ge); /* NeverNull because bound <expr> */
         2547  +    VdbeCoverageNeverNullIf(v, op==OP_Le); /*   values previously checked */
  2549   2548       windowAggFinal(&s, 0);
  2550   2549       sqlite3VdbeAddOp2(v, OP_Rewind, s.current.csr, 1);
  2551   2550       VdbeCoverageNeverTaken(v);
  2552   2551       windowReturnOneRow(&s);
  2553   2552       sqlite3VdbeAddOp1(v, OP_ResetSorter, s.current.csr);
  2554   2553       sqlite3VdbeAddOp2(v, OP_Goto, 0, lblWhereEnd);
  2555   2554       sqlite3VdbeJumpHere(v, addrGe);