1
0
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:
dan
2022-08-06 15:28:37 +00:00
parent 8e658f0a13
commit 8c3cc71a5a
3 changed files with 8 additions and 8 deletions

View File

@@ -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];
}