mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Fix a rounding error caused by scalar->logarithm->scalar conversion when using stat4 data to estimate some range scans.
FossilOrigin-Name: 86e30d7c4bb1cebe25b66686d6d1ee170c1a88e5a6c1bed6652ebbb024d62062
This commit is contained in:
@@ -1567,7 +1567,7 @@ static int whereKeyStats(
|
||||
** is larger than all samples in the array. */
|
||||
tRowcnt iUpper, iGap;
|
||||
if( i>=pIdx->nSample ){
|
||||
iUpper = sqlite3LogEstToInt(pIdx->aiRowLogEst[0]);
|
||||
iUpper = pIdx->nRowEst0;
|
||||
}else{
|
||||
iUpper = aSample[i].anLt[iCol];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user