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

Ensure that when a Select object is reset a new, empty, SrcList is allocated.

FossilOrigin-Name: 4889cbf898d7ec54f061b21b6d3621b22fc482cbeaa7115d40995a4cc30e41db
This commit is contained in:
dan
2020-01-03 13:55:14 +00:00
parent 0cbec59c8b
commit aa328b6ab1
4 changed files with 33 additions and 9 deletions

View File

@ -1554,4 +1554,27 @@ do_execsql_test 46.4 {
OR ((SELECT sum(a)OVER(ORDER BY a)) AND a<=10)
} 10
#-------------------------------------------------------------------------
reset_db
do_execsql_test 47.0 {
CREATE TABLE t1(
a,
e,
f,
g UNIQUE,
h UNIQUE
);
}
do_execsql_test 47.1 {
CREATE VIEW t2(k) AS
SELECT e FROM t1 WHERE g = 'abc' OR h BETWEEN 10 AND f;
}
do_catchsql_test 47.2 {
SELECT 234 FROM t2
WHERE k=1
OR (SELECT k FROM t2 WHERE (SELECT sum(a) OVER() FROM t1 GROUP BY 1));
} {1 {misuse of window function sum()}}
finish_test