diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbeaux.c | 2 | ||||
-rw-r--r-- | src/whereexpr.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index 492a41599..7cce57a73 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -3655,9 +3655,9 @@ static int vdbeCompareMemString( v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc); n2 = v2==0 ? 0 : c2.n; rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2); + if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; sqlite3VdbeMemRelease(&c1); sqlite3VdbeMemRelease(&c2); - if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM; return rc; } } diff --git a/src/whereexpr.c b/src/whereexpr.c index 99a97079b..e0b8bac1b 100644 --- a/src/whereexpr.c +++ b/src/whereexpr.c @@ -202,6 +202,7 @@ static int isLikeOrGlob( sqlite3 *db = pParse->db; /* Database connection */ sqlite3_value *pVal = 0; int op; /* Opcode of pRight */ + int rc; /* Result code to return */ if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){ return 0; @@ -267,8 +268,9 @@ static int isLikeOrGlob( } } + rc = (z!=0); sqlite3ValueFree(pVal); - return (z!=0); + return rc; } #endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */ |