Fossil SCM
re-apply [963c950cd6ac8cc8b9503f20a90ffac8e383c1de|963c950cd6]: for pre-3.8.7 compatibility (needed with configure --disable-internal-sqlite)
Commit
3f5defebebdecedea6d1848d81d418cb7f55a0ab
Parent
6b2f0b209f99881…
2 files changed
+11
+11
+11
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1428,10 +1428,21 @@ | ||
| 1428 | 1428 | } |
| 1429 | 1429 | } |
| 1430 | 1430 | sqlite3_finalize(pExplain); |
| 1431 | 1431 | sqlite3_free(zEQP); |
| 1432 | 1432 | } |
| 1433 | + | |
| 1434 | +#if USE_SYSTEM_SQLITE+0==1 | |
| 1435 | + /* Output TESTCTRL_EXPLAIN text of requested */ | |
| 1436 | + if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){ | |
| 1437 | + const char *zExplain = 0; | |
| 1438 | + sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain); | |
| 1439 | + if( zExplain && zExplain[0] ){ | |
| 1440 | + fprintf(pArg->out, "%s", zExplain); | |
| 1441 | + } | |
| 1442 | + } | |
| 1443 | +#endif | |
| 1433 | 1444 | |
| 1434 | 1445 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1435 | 1446 | ** data required to add indents to the output.*/ |
| 1436 | 1447 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1437 | 1448 | explain_data_prepare(pArg, pStmt); |
| 1438 | 1449 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1428,10 +1428,21 @@ | |
| 1428 | } |
| 1429 | } |
| 1430 | sqlite3_finalize(pExplain); |
| 1431 | sqlite3_free(zEQP); |
| 1432 | } |
| 1433 | |
| 1434 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1435 | ** data required to add indents to the output.*/ |
| 1436 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1437 | explain_data_prepare(pArg, pStmt); |
| 1438 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1428,10 +1428,21 @@ | |
| 1428 | } |
| 1429 | } |
| 1430 | sqlite3_finalize(pExplain); |
| 1431 | sqlite3_free(zEQP); |
| 1432 | } |
| 1433 | |
| 1434 | #if USE_SYSTEM_SQLITE+0==1 |
| 1435 | /* Output TESTCTRL_EXPLAIN text of requested */ |
| 1436 | if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){ |
| 1437 | const char *zExplain = 0; |
| 1438 | sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain); |
| 1439 | if( zExplain && zExplain[0] ){ |
| 1440 | fprintf(pArg->out, "%s", zExplain); |
| 1441 | } |
| 1442 | } |
| 1443 | #endif |
| 1444 | |
| 1445 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1446 | ** data required to add indents to the output.*/ |
| 1447 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1448 | explain_data_prepare(pArg, pStmt); |
| 1449 |
+11
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1428,10 +1428,21 @@ | ||
| 1428 | 1428 | } |
| 1429 | 1429 | } |
| 1430 | 1430 | sqlite3_finalize(pExplain); |
| 1431 | 1431 | sqlite3_free(zEQP); |
| 1432 | 1432 | } |
| 1433 | + | |
| 1434 | +#if USE_SYSTEM_SQLITE+0==1 | |
| 1435 | + /* Output TESTCTRL_EXPLAIN text of requested */ | |
| 1436 | + if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){ | |
| 1437 | + const char *zExplain = 0; | |
| 1438 | + sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain); | |
| 1439 | + if( zExplain && zExplain[0] ){ | |
| 1440 | + fprintf(pArg->out, "%s", zExplain); | |
| 1441 | + } | |
| 1442 | + } | |
| 1443 | +#endif | |
| 1433 | 1444 | |
| 1434 | 1445 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1435 | 1446 | ** data required to add indents to the output.*/ |
| 1436 | 1447 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1437 | 1448 | explain_data_prepare(pArg, pStmt); |
| 1438 | 1449 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1428,10 +1428,21 @@ | |
| 1428 | } |
| 1429 | } |
| 1430 | sqlite3_finalize(pExplain); |
| 1431 | sqlite3_free(zEQP); |
| 1432 | } |
| 1433 | |
| 1434 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1435 | ** data required to add indents to the output.*/ |
| 1436 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1437 | explain_data_prepare(pArg, pStmt); |
| 1438 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1428,10 +1428,21 @@ | |
| 1428 | } |
| 1429 | } |
| 1430 | sqlite3_finalize(pExplain); |
| 1431 | sqlite3_free(zEQP); |
| 1432 | } |
| 1433 | |
| 1434 | #if USE_SYSTEM_SQLITE+0==1 |
| 1435 | /* Output TESTCTRL_EXPLAIN text of requested */ |
| 1436 | if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){ |
| 1437 | const char *zExplain = 0; |
| 1438 | sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain); |
| 1439 | if( zExplain && zExplain[0] ){ |
| 1440 | fprintf(pArg->out, "%s", zExplain); |
| 1441 | } |
| 1442 | } |
| 1443 | #endif |
| 1444 | |
| 1445 | /* If the shell is currently in ".explain" mode, gather the extra |
| 1446 | ** data required to add indents to the output.*/ |
| 1447 | if( pArg && pArg->mode==MODE_Explain ){ |
| 1448 | explain_data_prepare(pArg, pStmt); |
| 1449 |