1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Have sqlite3_expert_analyze() populate the sqlite_stat1 table before running

queries through the planner for the second time.

FossilOrigin-Name: a157fcfde5afc27ae38e7cf4669fcc8e60e23d9d301ffe2e541dd69f895b493b
This commit is contained in:
dan
2017-04-18 20:10:16 +00:00
parent 7853002c71
commit a6ed5a4f39
5 changed files with 387 additions and 19 deletions

View File

@ -106,7 +106,7 @@ static int SQLITE_TCLAPI testExpertCmd(
case 3: { /* report */
const char *aEnum[] = {
"sql", "indexes", "plan", 0
"sql", "indexes", "plan", "candidates", 0
};
int iEnum;
int iStmt;
@ -121,6 +121,7 @@ static int SQLITE_TCLAPI testExpertCmd(
assert( EXPERT_REPORT_SQL==1 );
assert( EXPERT_REPORT_INDEXES==2 );
assert( EXPERT_REPORT_PLAN==3 );
assert( EXPERT_REPORT_CANDIDATES==4 );
zReport = sqlite3_expert_report(pExpert, iStmt, 1+iEnum);
Tcl_SetObjResult(interp, Tcl_NewStringObj(zReport, -1));
break;