1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Further enhancements and fixes for explain query plan.

FossilOrigin-Name: 73c93f5a2a32ee8c5d07c9ba33b2641e72626627
This commit is contained in:
dan
2010-11-09 14:48:59 +00:00
parent 2ce224535f
commit 4a07e3db27
7 changed files with 174 additions and 72 deletions

View File

@@ -1600,6 +1600,16 @@ int sqlite3CodeSubselect(
assert( testAddr>0 || pParse->db->mallocFailed );
}
#ifndef SQLITE_OMIT_EXPLAIN
if( pParse->explain==2 ){
char *zMsg = sqlite3MPrintf(
pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr?"":"CORRELATED ",
pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId
);
sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
}
#endif
switch( pExpr->op ){
case TK_IN: {
char affinity; /* Affinity of the LHS of the IN */