Fossil SCM

Revert to SQLite trunk's version of shell.c (3.8.7.1 missed a bug-fix already there). Re-add some lines needed for pre-3.8.7 compatibility (needed with configure --disable-internal-sqlite).

jan.nijtmans 2014-10-30 15:26 trunk
Commit 963c950cd6ac8cc8b9503f20a90ffac8e383c1de
1 file changed +12 -1
+12 -1
--- src/shell.c
+++ src/shell.c
@@ -880,11 +880,11 @@
880880
for(i=0; i<nArg; i++){
881881
output_csv(p, azCol[i] ? azCol[i] : "", i<nArg-1);
882882
}
883883
fprintf(p->out,"%s",p->newline);
884884
}
885
- if( azArg>0 ){
885
+ if( nArg>0 ){
886886
for(i=0; i<nArg; i++){
887887
output_csv(p, azArg[i], i<nArg-1);
888888
}
889889
fprintf(p->out,"%s",p->newline);
890890
}
@@ -1350,10 +1350,21 @@
13501350
}
13511351
}
13521352
sqlite3_finalize(pExplain);
13531353
sqlite3_free(zEQP);
13541354
}
1355
+
1356
+#if USE_SYSTEM_SQLITE+0==1
1357
+ /* Output TESTCTRL_EXPLAIN text of requested */
1358
+ if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){
1359
+ const char *zExplain = 0;
1360
+ sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain);
1361
+ if( zExplain && zExplain[0] ){
1362
+ fprintf(pArg->out, "%s", zExplain);
1363
+ }
1364
+ }
1365
+#endif
13551366
13561367
/* If the shell is currently in ".explain" mode, gather the extra
13571368
** data required to add indents to the output.*/
13581369
if( pArg && pArg->mode==MODE_Explain ){
13591370
explain_data_prepare(pArg, pStmt);
13601371
--- src/shell.c
+++ src/shell.c
@@ -880,11 +880,11 @@
880 for(i=0; i<nArg; i++){
881 output_csv(p, azCol[i] ? azCol[i] : "", i<nArg-1);
882 }
883 fprintf(p->out,"%s",p->newline);
884 }
885 if( azArg>0 ){
886 for(i=0; i<nArg; i++){
887 output_csv(p, azArg[i], i<nArg-1);
888 }
889 fprintf(p->out,"%s",p->newline);
890 }
@@ -1350,10 +1350,21 @@
1350 }
1351 }
1352 sqlite3_finalize(pExplain);
1353 sqlite3_free(zEQP);
1354 }
 
 
 
 
 
 
 
 
 
 
 
1355
1356 /* If the shell is currently in ".explain" mode, gather the extra
1357 ** data required to add indents to the output.*/
1358 if( pArg && pArg->mode==MODE_Explain ){
1359 explain_data_prepare(pArg, pStmt);
1360
--- src/shell.c
+++ src/shell.c
@@ -880,11 +880,11 @@
880 for(i=0; i<nArg; i++){
881 output_csv(p, azCol[i] ? azCol[i] : "", i<nArg-1);
882 }
883 fprintf(p->out,"%s",p->newline);
884 }
885 if( nArg>0 ){
886 for(i=0; i<nArg; i++){
887 output_csv(p, azArg[i], i<nArg-1);
888 }
889 fprintf(p->out,"%s",p->newline);
890 }
@@ -1350,10 +1350,21 @@
1350 }
1351 }
1352 sqlite3_finalize(pExplain);
1353 sqlite3_free(zEQP);
1354 }
1355
1356 #if USE_SYSTEM_SQLITE+0==1
1357 /* Output TESTCTRL_EXPLAIN text of requested */
1358 if( pArg && pArg->mode==MODE_Explain && sqlite3_libversion_number()<3008007 ){
1359 const char *zExplain = 0;
1360 sqlite3_test_control(SQLITE_TESTCTRL_EXPLAIN_STMT, pStmt, &zExplain);
1361 if( zExplain && zExplain[0] ){
1362 fprintf(pArg->out, "%s", zExplain);
1363 }
1364 }
1365 #endif
1366
1367 /* If the shell is currently in ".explain" mode, gather the extra
1368 ** data required to add indents to the output.*/
1369 if( pArg && pArg->mode==MODE_Explain ){
1370 explain_data_prepare(pArg, pStmt);
1371

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button