1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

When the sqlite3WindowRewrite() routine detects and error, have it convert

the SELECT statement into just "SELECT null" so that it does not leave the
parse tree in a goofy state that can cause problems with subsequent code
before the stack has a chance to unwind and report the error.
Ticket [d87336c81c7d0873]

FossilOrigin-Name: fa58aad48a788802b13a819e49f9b8787f713bbe395c46c7295e821c52c81738
This commit is contained in:
drh
2019-12-25 23:54:21 +00:00
parent b44fec68a5
commit a9ebfe2030
7 changed files with 60 additions and 22 deletions

View File

@ -1329,7 +1329,7 @@ do_execsql_test 37.20 {
SELECT c FROM v0 WHERE c BETWEEN -10 AND 20;
} {}
# 2019-20-20 mrigger reported problem with a FILTER clause on an aggregate
# 2019-12-20 mrigger reported problem with a FILTER clause on an aggregate
# in a join.
#
reset_db
@ -1361,5 +1361,14 @@ do_execsql_test 39.4 {
SELECT * FROM t0 WHERE (t0.c0, 1) IN(SELECT NTILE(1) OVER(), 0 FROM t0);
}
# 2019-12-25 ticket d87336c81c7d0873
#
reset_db
do_catchsql_test 40.1 {
CREATE VIRTUAL TABLE t0 USING rtree(c0, c1, c2);
SELECT * FROM t0
WHERE ((0,0) IN (SELECT COUNT(*),LAG(5)OVER(PARTITION BY 0) FROM t0),0)<=(c1,0);
} {1 {1st ORDER BY term out of range - should be between 1 and 3}}
finish_test