1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Improvement to check-in [d564d8882ef18b55] to detect the OOM fault even

if it occurs deep down inside the duplicated expression.

FossilOrigin-Name: 3e863cd09355abd80c1053d6d4dabb55841f806e3c418f923d67d36bf8313cb0
This commit is contained in:
drh
2021-04-19 20:36:13 +00:00
parent 5e8e7464d0
commit 8c6cb1bc6f
3 changed files with 11 additions and 8 deletions

View File

@@ -3627,7 +3627,10 @@ static Expr *substExpr(
}
testcase( ExprHasProperty(pCopy, EP_Subquery) );
pNew = sqlite3ExprDup(db, pCopy, 0);
if( pNew==0 ) return pExpr;
if( db->mallocFailed ){
sqlite3ExprDelete(db, pNew);
return pExpr;
}
if( pSubst->isLeftJoin ){
ExprSetProperty(pNew, EP_CanBeNull);
}