1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Begin adding the data-structure explaining subsystem. All is contained within

FossilOrigin-Name: 79ae51c5b1b20ed0a425a87e65a32a096a80b7e1
This commit is contained in:
drh
2011-12-06 19:44:51 +00:00
parent ed51f29774
commit 7e02e5e6b5
13 changed files with 297 additions and 89 deletions

View File

@@ -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.
*/