diff options
author | drh <drh@noemail.net> | 2019-08-23 13:08:49 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-08-23 13:08:49 +0000 |
commit | 74e1b861ad749a00966583c29f0e2d8dfb510c82 (patch) | |
tree | eb2debd2747b0851e753f14bf491e715d0dd298e /src/wherecode.c | |
parent | 505ae9def80b7b45e37a454064f1cf23df26bdf1 (diff) | |
download | sqlite-74e1b861ad749a00966583c29f0e2d8dfb510c82.tar.gz sqlite-74e1b861ad749a00966583c29f0e2d8dfb510c82.zip |
Extra VDBE comments in the NULLS LAST logic provide landmarks to help
understand the EXPLAIN output.
FossilOrigin-Name: 649b08ead50f10a9ec0357a5e1ed020195d9f93be61ef703ea036a8e53f07a34
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 55ac394b6..12ed0d7af 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -1550,7 +1550,7 @@ Bitmask sqlite3WhereCodeOneLoopStart( u8 bSeekPastNull = 0; /* True to seek past initial nulls */ u8 bStopAtNull = 0; /* Add condition to terminate at NULLs */ int omitTable; /* True if we use the index only */ - int regBignull = 0; + int regBignull = 0; /* big-null flag register */ pIdx = pLoop->u.btree.pIndex; iIdxCur = pLevel->iIdxCur; @@ -1691,6 +1691,7 @@ Bitmask sqlite3WhereCodeOneLoopStart( } if( regBignull ){ sqlite3VdbeAddOp2(v, OP_Integer, 0, regBignull); + VdbeComment((v, "NULL-scan flag")); } op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev]; @@ -1776,6 +1777,7 @@ Bitmask sqlite3WhereCodeOneLoopStart( if( nConstraint ){ if( regBignull ){ sqlite3VdbeAddOp2(v, OP_If, regBignull, sqlite3VdbeCurrentAddr(v)+3); + VdbeComment((v, "If in NULL-scan")); VdbeCoverage(v); } op = aEndOp[bRev*2 + endEq]; @@ -1787,6 +1789,7 @@ Bitmask sqlite3WhereCodeOneLoopStart( } if( regBignull ){ sqlite3VdbeAddOp2(v, OP_IfNot, regBignull, sqlite3VdbeCurrentAddr(v)+2); + VdbeComment((v, "If not in NULL-scan")); VdbeCoverage(v); if( bStopAtNull ){ op = aEndOp[bRev*2 + 0]; |