diff options
author | drh <> | 2025-01-25 00:07:14 +0000 |
---|---|---|
committer | drh <> | 2025-01-25 00:07:14 +0000 |
commit | dea434ea6513a3f91bf15ce4106db0c54a9d6161 (patch) | |
tree | 3e0117c67992fb64de5b76d744148c1791d6b734 /src | |
parent | bc7e41c03c9009c96cf3f1179ba0545ba3561abe (diff) | |
download | sqlite-dea434ea6513a3f91bf15ce4106db0c54a9d6161.tar.gz sqlite-dea434ea6513a3f91bf15ce4106db0c54a9d6161.zip |
Avoid calling computeMxChoice() after an OOM as some assert()s can fail
in that routine if a prior OOM occurred while building the WhereLoop array.
FossilOrigin-Name: 8b9e621dbf599d7e75e07d75d4c400247d693ea76e00eba0919f4e33e3e10bdd
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c index eeea2e13d..24674f91d 100644 --- a/src/where.c +++ b/src/where.c @@ -5652,6 +5652,8 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ mxChoice = 1; }else if( nLoop==2 ){ mxChoice = 5; + }else if( pParse->nErr ){ + mxChoice = 1; }else{ mxChoice = computeMxChoice(pWInfo); } |