mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-21 11:13:54 +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:
@@ -1816,8 +1816,10 @@ static void sumFinalize(sqlite3_context *context){
|
||||
if( p->approx ){
|
||||
if( p->ovrfl ){
|
||||
sqlite3_result_error(context,"integer overflow",-1);
|
||||
}else{
|
||||
}else if( !sqlite3IsNaN(p->rErr) ){
|
||||
sqlite3_result_double(context, p->rSum+p->rErr);
|
||||
}else{
|
||||
sqlite3_result_double(context, p->rSum);
|
||||
}
|
||||
}else{
|
||||
sqlite3_result_int64(context, p->iSum);
|
||||
|
Reference in New Issue
Block a user