diff options
author | drh <> | 2024-05-30 13:27:29 +0000 |
---|---|---|
committer | drh <> | 2024-05-30 13:27:29 +0000 |
commit | 1344b540d92f65c7a981b2aaaf3982687f9f792f (patch) | |
tree | 4549dae4221847097726ab3b7e48936d7a34e7c0 /src | |
parent | 5b7048d5af1ec22371bb1f57556548f9724903c3 (diff) | |
download | sqlite-1344b540d92f65c7a981b2aaaf3982687f9f792f.tar.gz sqlite-1344b540d92f65c7a981b2aaaf3982687f9f792f.zip |
Ensure that the second pass call to wherePathSolver() always reports a positive
value for the estimated number of output rows. This fixes a long-standing
(though exceedingly minor) problem that was only revealed by a new assert()
added yesterday. dbsqlfuzz 545d6debc2da496ab2b915e33ea34d9a35a935df
FossilOrigin-Name: a47c644fef71f3ab3dc584ea917eaab9a8e5b4c9dcb57bdd29747ba32108e85f
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 6f7d46973..ed095fa3b 100644 --- a/src/where.c +++ b/src/where.c @@ -6644,7 +6644,7 @@ WhereInfo *sqlite3WhereBegin( if( db->mallocFailed ) goto whereBeginError; if( pWInfo->pOrderBy ){ whereInterstageHeuristic(pWInfo); - wherePathSolver(pWInfo, pWInfo->nRowOut+1); + wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); if( db->mallocFailed ) goto whereBeginError; } |