mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-24 22:22:08 +03:00
Ensure that aggregate functions that (a) are part of SELECT statements with no FROM clause and (b) have one or more scalar sub-selects as arguments are assigned to the correct aggregate context.
FossilOrigin-Name: 16a41fa8c4c74bba4e908a9c19e6cf5a927cac140e2070c9abf303158be7257b
This commit is contained in:
@ -255,7 +255,7 @@ do_execsql_test 8.2 {
|
||||
|
||||
do_catchsql_test 8.3 {
|
||||
SELECT min( max((SELECT x FROM v1)) ) OVER()
|
||||
} {1 {misuse of aggregate: max()}}
|
||||
} {0 0}
|
||||
|
||||
do_execsql_test 8.4 {
|
||||
SELECT(
|
||||
@ -263,6 +263,6 @@ do_execsql_test 8.4 {
|
||||
SELECT sum( avg((SELECT x FROM v1)) ) OVER()
|
||||
)
|
||||
FROM v1;
|
||||
} {0.0}
|
||||
} {0.0 0.0}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user