diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index 4da9d6263..fca03a8d9 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1581,9 +1581,11 @@ int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){ iCol = (i16)pExpr->iColumn; /* Code an OP_VerifyCookie and OP_TableLock for <table>. */ - iDb = sqlite3SchemaToIndex(db, pTab->pSchema); - sqlite3CodeVerifySchema(pParse, iDb); - sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName); + if( pTab->pSchema ){ + iDb = sqlite3SchemaToIndex(db, pTab->pSchema); + sqlite3CodeVerifySchema(pParse, iDb); + sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName); + } /* This function is only called from two places. In both cases the vdbe ** has already been allocated. So assume sqlite3GetVdbe() is always |