aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr.c3
-rw-r--r--src/select.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 62d2691bc..126a870f9 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -2803,7 +2803,8 @@ int sqlite3FindInIndex(
CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);
int j;
- assert( pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr );
+ assert( pReq!=0 || pRhs->iColumn==XN_ROWID
+ || pParse->nErr || db->mallocFailed );
for(j=0; j<nExpr; j++){
if( pIdx->aiColumn[j]!=pRhs->iColumn ) continue;
assert( pIdx->azColl[j] );
diff --git a/src/select.c b/src/select.c
index ebb746467..5cf6ebf1e 100644
--- a/src/select.c
+++ b/src/select.c
@@ -2209,6 +2209,9 @@ void sqlite3SelectAddColumnTypeAndCollation(
if( pCol->zCnName ){
memcpy(&pCol->zCnName[n+1], zType, m+1);
pCol->colFlags |= COLFLAG_HASTYPE;
+ }else{
+ testcase( pCol->colFlags & COLFLAG_HASTYPE );
+ pCol->colFlags &= ~(COLFLAG_HASTYPE|COLFLAG_HASCOLL);
}
}
if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;