1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Remove an unreachable branch in the NULLS LAST logic of RANGE window

functions.

FossilOrigin-Name: 47cd634c98b502d40a493455ba6d73cbd0dae74944f9cf06fcbcd025f4b49d6e
This commit is contained in:
drh
2019-08-29 16:17:59 +00:00
parent b6a9121bb3
commit f76ccb7d54
3 changed files with 13 additions and 15 deletions

View File

@@ -1864,7 +1864,7 @@ static void windowIfNewPeer(
*/
static void windowCodeRangeTest(
WindowCodeArg *p,
int op, /* OP_Ge or OP_Gt */
int op, /* OP_Ge, OP_Gt, or OP_Le */
int csr1,
int regVal,
int csr2,
@@ -1908,14 +1908,12 @@ static void windowCodeRangeTest(
switch( op ){
case OP_Ge: sqlite3VdbeAddOp2(v, OP_Goto, 0, lbl); break;
case OP_Gt:
sqlite3VdbeAddOp2(v, OP_NotNull, reg2, lbl);
VdbeCoverage(v);
sqlite3VdbeAddOp2(v, OP_NotNull, reg2, lbl); VdbeCoverage(v);
break;
case OP_Le:
sqlite3VdbeAddOp2(v, OP_IsNull, reg2, lbl);
VdbeCoverage(v);
default:
assert( op==OP_Le );
sqlite3VdbeAddOp2(v, OP_IsNull, reg2, lbl); VdbeCoverage(v);
break;
default: assert( op==OP_Lt ); /* no-op */
}
sqlite3VdbeAddOp2(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+2);
sqlite3VdbeJumpHere(v, addr);