** Display and reset the EXPLAIN QUERY PLAN data */
| 17348 | ** Display and reset the EXPLAIN QUERY PLAN data |
| 17349 | */ |
| 17350 | static void eqp_render(ShellState *p, i64 nCycle){ |
| 17351 | EQPGraphRow *pRow = p->sGraph.pRow; |
| 17352 | if( pRow ){ |
| 17353 | if( pRow->zText[0]=='-' ){ |
| 17354 | if( pRow->pNext==0 ){ |
| 17355 | eqp_reset(p); |
| 17356 | return; |
| 17357 | } |
| 17358 | utf8_printf(p->out, "%s\n", pRow->zText+3); |
| 17359 | p->sGraph.pRow = pRow->pNext; |
| 17360 | sqlite3_free(pRow); |
| 17361 | }else if( nCycle>0 ){ |
| 17362 | utf8_printf(p->out, "QUERY PLAN (cycles=%lld [100%%])\n", nCycle); |
| 17363 | }else{ |
| 17364 | utf8_printf(p->out, "QUERY PLAN\n"); |
| 17365 | } |
| 17366 | p->sGraph.zPrefix[0] = 0; |
| 17367 | eqp_render_level(p, 0); |
| 17368 | eqp_reset(p); |
| 17369 | } |
| 17370 | } |
| 17371 | |
| 17372 | #ifndef SQLITE_OMIT_PROGRESS_CALLBACK |
| 17373 | /* |
no test coverage detected