mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
In the STAT4 computations, ensure that the aAvgEq values do not go negative.
FossilOrigin-Name: f58f75b5a06f88ba97bd1a02bee621c64691c6f8
This commit is contained in:
@@ -1615,7 +1615,7 @@ static void initAvgEq(Index *pIdx){
|
||||
}
|
||||
}
|
||||
|
||||
if( nDist100>nSum100 ){
|
||||
if( nDist100>nSum100 && sumEq<nRow ){
|
||||
avgEq = ((i64)100 * (nRow - sumEq))/(nDist100 - nSum100);
|
||||
}
|
||||
if( avgEq==0 ) avgEq = 1;
|
||||
|
Reference in New Issue
Block a user