Disable tracing pragmas when not in debug mode. This eliminates an external
dependency on stdout. (CVS 3959) FossilOrigin-Name: 5a0fe9854849bf3f04008a5dbb7a74e7d0d815ca
This commit is contained in:
parent
ee85813c94
commit
cf1023c08d
20
manifest
20
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sthe\samalgamation\sgenerator\sso\sthat\sall\snon-API\sfunctions\shave\sfile\sscope.\s(CVS\s3958)
|
||||
D 2007-05-08T20:37:39
|
||||
C Disable\stracing\spragmas\swhen\snot\sin\sdebug\smode.\s\sThis\seliminates\san\sexternal\ndependency\son\sstdout.\s(CVS\s3959)
|
||||
D 2007-05-08T20:59:49
|
||||
F Makefile.in 87b200ad9970907f76df734d29dff3d294c10935
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -64,7 +64,7 @@ F src/auth.c 902f4722661c796b97f007d9606bd7529c02597f
|
||||
F src/btree.c dca996d45f1b8a87c86d0ec22a7ef6ca8c1ab805
|
||||
F src/btree.h 8444af0c82c0e878b5ce8a6eb345904830e678a5
|
||||
F src/btreeInt.h cb3c0e9eb842d06079a62cdf3492c90c5db7ba75
|
||||
F src/build.c 83ae5b1f806e7abe323e9c6d32c9e80a5bab1ad7
|
||||
F src/build.c 5789303291d40a1d37bfede83c1c769be22c88ab
|
||||
F src/callback.c 9c12535669a638f90a67e10440b99c7b93c0fbf4
|
||||
F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
|
||||
F src/date.c 263ef5b81b4ffdd80e8a830645798967bbbcfd05
|
||||
@ -95,7 +95,7 @@ F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c c5b32e741fb73930b6ec3d886ea680a3de3be5f7
|
||||
F src/pager.h db31691786504625e7e25c8cde4f40779ba209d9
|
||||
F src/parse.y fe7efcbf0ef1727cb2c08c1a10869b4ac9d5e71d
|
||||
F src/pragma.c b881b457170d4922893f59b1caaac98f8e4192e2
|
||||
F src/pragma.c 0703152b9edd6601eea95e1d474b3bc2962d7920
|
||||
F src/prepare.c 87c23644986b5e41a58bc76f05abebd899e00089
|
||||
F src/printf.c 67de0dcb40ef3297f4a047b434b81585c0f7062d
|
||||
F src/random.c 6119474a6f6917f708c1dee25b9a8e519a620e88
|
||||
@ -132,11 +132,11 @@ F src/update.c 3359041db390a8f856d67272f299600e2104f350
|
||||
F src/utf.c 168fe53589e2d0faec053af098c0d02e6a7690a8
|
||||
F src/util.c 4f6bbcec2b2b1884d652b82c9f8949ede4618d68
|
||||
F src/vacuum.c 8bd895d29e7074e78d4e80f948e35ddc9cf2beef
|
||||
F src/vdbe.c 4e4951b6906065eee74d89f7fedc1e4bddc738d7
|
||||
F src/vdbe.c a24290221c20a2c5436f79bc52a9271457138416
|
||||
F src/vdbe.h a6c910b7361c927bd516d5a76de9278fe6703ce7
|
||||
F src/vdbeInt.h 77a17f1a8bcbbb660bf4515c78d74280b4e8be5c
|
||||
F src/vdbeInt.h 095222fefd7343893cb7e2da7473590b58fb0aad
|
||||
F src/vdbeapi.c 120e04492e98e3cfd5545dd7130c76987e40e8b3
|
||||
F src/vdbeaux.c c432e17fef6efaf102d507e979cee4e47f6ceac4
|
||||
F src/vdbeaux.c 62011e2ccf5fa9b3dcc7fa6ff5f0e0638d324a70
|
||||
F src/vdbeblob.c 96f3572fdc45eda5be06e6372b612bc30742d9f0
|
||||
F src/vdbefifo.c 3ca8049c561d5d67cbcb94dc909ae9bb68c0bf8f
|
||||
F src/vdbemem.c f9ef7a16993130e610dd994a1a76b1e831857e27
|
||||
@ -486,7 +486,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||
P 21299b917812920c70001c2d3d9b65f66eca6b24
|
||||
R f5e11c4825810592f7823911f802a794
|
||||
P e9f56ead0514f3eac75807ea710c1f035b8add4f
|
||||
R fee0a386491a138dc132cc38920c0e49
|
||||
U drh
|
||||
Z 94aa2a64018d167955147d322be81e07
|
||||
Z 5fc9ecc351f15a6ac4eae3d9e044c2d3
|
||||
|
@ -1 +1 @@
|
||||
e9f56ead0514f3eac75807ea710c1f035b8add4f
|
||||
5a0fe9854849bf3f04008a5dbb7a74e7d0d815ca
|
@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.428 2007/05/08 20:37:39 drh Exp $
|
||||
** $Id: build.c,v 1.429 2007/05/08 20:59:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -194,8 +194,10 @@ void sqlite3FinishCoding(Parse *pParse){
|
||||
/* Get the VDBE program ready for execution
|
||||
*/
|
||||
if( v && pParse->nErr==0 && !sqlite3MallocFailed() ){
|
||||
#ifdef SQLITE_DEBUG
|
||||
FILE *trace = (db->flags & SQLITE_VdbeTrace)!=0 ? stdout : 0;
|
||||
sqlite3VdbeTrace(v, trace);
|
||||
#endif
|
||||
sqlite3VdbeMakeReady(v, pParse->nVar, pParse->nMem+3,
|
||||
pParse->nTab+3, pParse->explain);
|
||||
pParse->rc = SQLITE_DONE;
|
||||
|
10
src/pragma.c
10
src/pragma.c
@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the PRAGMA command.
|
||||
**
|
||||
** $Id: pragma.c,v 1.136 2007/05/08 14:51:37 drh Exp $
|
||||
** $Id: pragma.c,v 1.137 2007/05/08 20:59:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -172,15 +172,17 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
|
||||
const char *zName; /* Name of the pragma */
|
||||
int mask; /* Mask for the db->flags value */
|
||||
} aPragma[] = {
|
||||
{ "vdbe_trace", SQLITE_VdbeTrace },
|
||||
{ "sql_trace", SQLITE_SqlTrace },
|
||||
{ "vdbe_listing", SQLITE_VdbeListing },
|
||||
{ "full_column_names", SQLITE_FullColNames },
|
||||
{ "short_column_names", SQLITE_ShortColNames },
|
||||
{ "count_changes", SQLITE_CountRows },
|
||||
{ "empty_result_callbacks", SQLITE_NullCallback },
|
||||
{ "legacy_file_format", SQLITE_LegacyFileFmt },
|
||||
{ "fullfsync", SQLITE_FullFSync },
|
||||
#ifdef SQLITE_DEBUG
|
||||
{ "sql_trace", SQLITE_SqlTrace },
|
||||
{ "vdbe_listing", SQLITE_VdbeListing },
|
||||
{ "vdbe_trace", SQLITE_VdbeTrace },
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_CHECK
|
||||
{ "ignore_check_constraints", SQLITE_IgnoreChecks },
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@
|
||||
** in this file for details. If in doubt, do not deviate from existing
|
||||
** commenting and indentation practices when changing or adding code.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.611 2007/05/08 20:37:40 drh Exp $
|
||||
** $Id: vdbe.c,v 1.612 2007/05/08 20:59:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -5074,8 +5074,8 @@ default: {
|
||||
assert( !sqlite3VdbeMemTooBig(pTos) );
|
||||
}
|
||||
assert( pc>=-1 && pc<p->nOp );
|
||||
#ifdef SQLITE_DEBUG
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/* Code for tracing the vdbe stack. */
|
||||
if( p->trace && pTos>=p->aStack ){
|
||||
int i;
|
||||
|
@ -288,7 +288,6 @@ struct Context {
|
||||
struct Vdbe {
|
||||
sqlite3 *db; /* The whole database */
|
||||
Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
|
||||
FILE *trace; /* Write an execution trace here, if not NULL */
|
||||
int nOp; /* Number of instructions in the program */
|
||||
int nOpAlloc; /* Number of slots allocated for aOp[] */
|
||||
Op *aOp; /* Space to hold the virtual machine's program */
|
||||
@ -336,6 +335,9 @@ struct Vdbe {
|
||||
i64 startTime; /* Time when query started - used for profiling */
|
||||
int nSql; /* Number of bytes in zSql */
|
||||
char *zSql; /* Text of the SQL statement that generated this */
|
||||
#ifdef SQLITE_DEBUG
|
||||
FILE *trace; /* Write an execution trace here, if not NULL */
|
||||
#endif
|
||||
#ifdef SQLITE_SSE
|
||||
int fetchId; /* Statement number used by sqlite3_fetch_statement */
|
||||
int lru; /* Counter used for LRU cache replacement */
|
||||
|
@ -88,12 +88,14 @@ void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
|
||||
pB->nSql = nTmp;
|
||||
}
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/*
|
||||
** Turn tracing on or off
|
||||
*/
|
||||
void sqlite3VdbeTrace(Vdbe *p, FILE *trace){
|
||||
p->trace = trace;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Resize the Vdbe.aOp array so that it contains at least N
|
||||
|
Loading…
x
Reference in New Issue
Block a user