diff options
author | drh <drh@noemail.net> | 2014-01-15 14:40:41 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-01-15 14:40:41 +0000 |
commit | a379b32f336f4ec5ff35c9a9acf323e95538eec4 (patch) | |
tree | 81648a560ad922f80d1102eb54cacd275c1283ad /src/expr.c | |
parent | bfe31e7f80a97601c4d68e9dbc359493669ab7e8 (diff) | |
download | sqlite-a379b32f336f4ec5ff35c9a9acf323e95538eec4.tar.gz sqlite-a379b32f336f4ec5ff35c9a9acf323e95538eec4.zip |
Don't try to verify the schema of transient table (such as generated inside
a WITH clause) when generating code for "IN table" operators.
FossilOrigin-Name: 860aa936634a60d68e3954fc408a96a9260394e0
Diffstat (limited to 'src/expr.c')
-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 |