1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Fix an issue with infinity handling by the SUM() function that goes back

to the extended-precision SUM() enhancement of
[check-in c63e26e705f5e967].  Problem reported by
[forum:/forumpost/1c06ddcacc86032a|forum post 1c06ddcacc86032a].

FossilOrigin-Name: 77d3dcd283595c52f24c07fc59ba60c9133b71c440cf3f799cf48c907c6fae3e
This commit is contained in:
drh
2023-08-28 12:20:18 +00:00
parent 0d066bc8a6
commit bd953dfcad
4 changed files with 20 additions and 10 deletions

View File

@ -1545,4 +1545,12 @@ do_catchsql_test func-37.120 {
SELECT sum(x) FROM c;
} {1 {integer overflow}}
# 2023-08-28 forum post https://sqlite.org/forum/forumpost/1c06ddcacc86032a
# Incorrect handling of infinity by SUM().
#
do_execsql_test func-38.100 {
WITH t1(x) AS (VALUES(9e+999)) SELECT sum(x) FROM t1;
WITH t1(x) AS (VALUES(-9e+999)) SELECT sum(x) FROM t1;
} {Inf -Inf}
finish_test