aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-06 19:44:51 +0000
committerdrh <drh@noemail.net>2011-12-06 19:44:51 +0000
commit7e02e5e6b54ea4a6b58249210c0df67af80b11a1 (patch)
tree9ea5abdb02f982bbe28130273f073871139110f7 /src/shell.c
parented51f29774ca0581de17d7f4a066fea1b0459948 (diff)
downloadsqlite-7e02e5e6b54ea4a6b58249210c0df67af80b11a1.tar.gz
sqlite-7e02e5e6b54ea4a6b58249210c0df67af80b11a1.zip
Begin adding the data-structure explaining subsystem. All is contained within
FossilOrigin-Name: 79ae51c5b1b20ed0a425a87e65a32a096a80b7e1
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c9
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.
*/