aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2025-01-25 00:07:14 +0000
committerdrh <>2025-01-25 00:07:14 +0000
commitdea434ea6513a3f91bf15ce4106db0c54a9d6161 (patch)
tree3e0117c67992fb64de5b76d744148c1791d6b734 /src
parentbc7e41c03c9009c96cf3f1179ba0545ba3561abe (diff)
downloadsqlite-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.c2
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);
}