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

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
This commit is contained in:
drh
2014-01-15 14:40:41 +00:00
parent bfe31e7f80
commit a379b32f33
3 changed files with 13 additions and 11 deletions

View File

@@ -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