diff options
author | drh <drh@noemail.net> | 2011-12-10 15:55:01 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-10 15:55:01 +0000 |
commit | 678a9aa7bdae01e70cb615058117b136eb045fbe (patch) | |
tree | b972d1674fbd74d0d0b055ef14422b54e5c1adaf /src/shell.c | |
parent | 3a0c9c0298776f8a3ca842fe555979768fdabac7 (diff) | |
parent | a5eec8c8c3b44b802d6571a436ec3b3bffd69f4c (diff) | |
download | sqlite-678a9aa7bdae01e70cb615058117b136eb045fbe.tar.gz sqlite-678a9aa7bdae01e70cb615058117b136eb045fbe.zip |
Import the experimental parse-tree explainer, with fixes, from the
tree-explain branch.
FossilOrigin-Name: bcbc7152d49107afa926c8950360c61a6cf3d244
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c index e33a0687b..93ed9a6db 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1127,6 +1127,15 @@ static int shell_exec( fprintf(pArg->out, "%s\n", zStmtSql ? zStmtSql : zSql); } + /* Output TESTCTRL_EXPLAIN text of requested */ + if( pArg && pArg->mode==MODE_Explain ){ + const char *zExplain = 0; + sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain); + if( zExplain && zExplain[0] ){ + fprintf(pArg->out, "%s", zExplain); + } + } + /* perform the first step. this will tell us if we ** have a result set or not and how wide it is. */ |