Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a764915b87564fa91ee68e9b1f41394c |
User & Date: | dan 2011-01-22 13:32:30.000 |
Context
2011-01-24
| ||
19:14 | Fix a harmless compiler warning (a shadowed local variable) in analyze.c. (check-in: a1ad7fb38b user: drh tags: trunk) | |
16:00 | Ensure that if a deferred FK constraint is violated by a statement that creates its own implicit transaction, the statement is not an "active-write" after sqlite3_step() returns. (Closed-Leaf check-in: 8063197ef1 user: dan tags: deferred-fk-quirk) | |
2011-01-22
| ||
13:32 | Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments. (check-in: a764915b87 user: dan tags: trunk) | |
2011-01-21
| ||
18:25 | Change sqlite3StrAccumAppend() to use realloc instead of malloc. (check-in: 380f61df07 user: dan tags: trunk) | |
Changes
install-sh became executable.
whitespace changes only
Changes to src/sqliteInt.h.
︙ | |||
812 813 814 815 816 817 818 819 820 821 822 823 824 825 | 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 | + | u8 orphanTrigger; /* Last statement is orphaned TEMP trigger */ } init; int nExtension; /* Number of loaded extensions */ void **aExtension; /* Array of shared library handles */ struct Vdbe *pVdbe; /* List of active virtual machines */ int activeVdbeCnt; /* Number of VDBEs currently executing */ int writeVdbeCnt; /* Number of active VDBEs that are writing */ int vdbeExecCnt; /* Number of nested calls to VdbeExec() */ void (*xTrace)(void*,const char*); /* Trace function */ void *pTraceArg; /* Argument to the trace function */ void (*xProfile)(void*,const char*,u64); /* Profiling function */ void *pProfileArg; /* Argument to profile function */ void *pCommitArg; /* Argument to xCommitCallback() */ int (*xCommitCallback)(void*); /* Invoked at every commit. */ void *pRollbackArg; /* Argument to xRollbackCallback() */ |
︙ |
Changes to src/vdbeapi.c.
︙ | |||
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | + + | } #ifndef SQLITE_OMIT_EXPLAIN if( p->explain ){ rc = sqlite3VdbeList(p); }else #endif /* SQLITE_OMIT_EXPLAIN */ { db->vdbeExecCnt++; rc = sqlite3VdbeExec(p); db->vdbeExecCnt--; } #ifndef SQLITE_OMIT_TRACE /* Invoke the profile callback if there is one */ if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){ sqlite3_int64 iNow; |
︙ |
Changes to src/vdbetrace.c.
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + - - - + + + + + | nTotal += n; zSql += n; } return nTotal; } /* ** This function returns a pointer to a nul-terminated string in memory |
︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + + + + | StrAccum out; /* Accumulate the output here */ char zBase[100]; /* Initial working space */ db = p->db; sqlite3StrAccumInit(&out, zBase, sizeof(zBase), db->aLimit[SQLITE_LIMIT_LENGTH]); out.db = db; if( db->vdbeExecCnt>1 ){ while( *zRawSql ){ const char *zStart = zRawSql; while( *(zRawSql++)!='\n' && *zRawSql ); sqlite3StrAccumAppend(&out, "-- ", 3); sqlite3StrAccumAppend(&out, zStart, zRawSql-zStart); } }else{ while( zRawSql[0] ){ n = findNextHostParameter(zRawSql, &nToken); assert( n>0 ); sqlite3StrAccumAppend(&out, zRawSql, n); zRawSql += n; assert( zRawSql[0] || nToken==0 ); if( nToken==0 ) break; |
︙ | |||
132 133 134 135 136 137 138 139 140 141 142 | 143 144 145 146 147 148 149 150 151 152 153 154 | + | sqlite3StrAccumAppend(&out, "x'", 2); for(i=0; i<pVar->n; i++){ sqlite3XPrintf(&out, "%02x", pVar->z[i]&0xff); } sqlite3StrAccumAppend(&out, "'", 1); } } } return sqlite3StrAccumFinish(&out); } #endif /* #ifndef SQLITE_OMIT_TRACE */ |
Added test/trace2.test.