1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Ensure that negative numbers may not be used in frame offset clauses even if they are initially text value. e.g. (RANGE BETWEEN '-1' PRECEDING ...).

FossilOrigin-Name: 8b681b274dd01c3e0f76d5bbddcbb2450c6d9475b9cfa0db961a3ab5edf51db1
This commit is contained in:
dan
2021-03-31 11:31:19 +00:00
parent 0d23f678b1
commit b03786ad6e
4 changed files with 27 additions and 9 deletions

View File

@@ -1469,6 +1469,7 @@ static void windowCheckValue(Parse *pParse, int reg, int eCond){
VdbeCoverageIf(v, eCond==2);
}
sqlite3VdbeAddOp3(v, aOp[eCond], regZero, sqlite3VdbeCurrentAddr(v)+2, reg);
sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC);
VdbeCoverageNeverNullIf(v, eCond==0); /* NULL case captured by */
VdbeCoverageNeverNullIf(v, eCond==1); /* the OP_MustBeInt */
VdbeCoverageNeverNullIf(v, eCond==2);