SQLite

Check-in [fa37cf9a6a]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fa37cf9a6aa3e4325674cb6af68f617d25e349c3f694d0117a19a36fc42daf15
User & Date: drh 2019-04-01 16:23:21.090
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: f0ed714637 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: fa37cf9a6a user: drh tags: trunk)
15:55
Mark rowid-comparison opcodes as never-null for VDBE coverage tracking purposes. (check-in: a69bb4f257 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/window.c.
2539
2540
2541
2542
2543
2544
2545
2546

2547
2548

2549
2550
2551
2552
2553
2554
2555
2539
2540
2541
2542
2543
2544
2545

2546


2547
2548
2549
2550
2551
2552
2553
2554







-
+
-
-
+







    sqlite3ExprCode(pParse, pMWin->pEnd, regEnd);
    windowCheckValue(pParse, regEnd, 1 + (pMWin->eFrmType==TK_RANGE ? 3 : 0));
  }

  if( pMWin->eStart==pMWin->eEnd && regStart ){
    int op = ((pMWin->eStart==TK_FOLLOWING) ? OP_Ge : OP_Le);
    int addrGe = sqlite3VdbeAddOp3(v, op, regStart, 0, regEnd);
    VdbeCoverage(v);
    VdbeCoverageNeverNullIf(v, op==OP_Ge); /* NeverNull because bound <expr> */
    VdbeCoverageIf(v, op==OP_Ge);
    VdbeCoverageIf(v, op==OP_Le);
    VdbeCoverageNeverNullIf(v, op==OP_Le); /*   values previously checked */
    windowAggFinal(&s, 0);
    sqlite3VdbeAddOp2(v, OP_Rewind, s.current.csr, 1);
    VdbeCoverageNeverTaken(v);
    windowReturnOneRow(&s);
    sqlite3VdbeAddOp1(v, OP_ResetSorter, s.current.csr);
    sqlite3VdbeAddOp2(v, OP_Goto, 0, lblWhereEnd);
    sqlite3VdbeJumpHere(v, addrGe);