1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add the sqlite3_expanded_sql() interface. Refinements to the

sqlite3_trace_v2() interface to make it more useful.

FossilOrigin-Name: 99ee7ee58d45b29a0000492306ddc0b90563ff51
This commit is contained in:
drh
2016-07-14 01:09:08 +00:00
parent 1637a5171f
commit fca760c841
11 changed files with 112 additions and 72 deletions

View File

@@ -1805,7 +1805,7 @@ int sqlite3_overload_function(
** SQL statement.
*/
#ifndef SQLITE_OMIT_DEPRECATED
void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
void *sqlite3_trace(sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg){
void *pOld;
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -1817,7 +1817,7 @@ void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
sqlite3_mutex_enter(db->mutex);
pOld = db->pTraceArg;
db->mTrace = xTrace ? SQLITE_TRACE_LEGACY : 0;
db->xTrace = (int(*)(u32,void*,void*,i64))xTrace;
db->xTrace = (int(*)(u32,void*,void*,void*))xTrace;
db->pTraceArg = pArg;
sqlite3_mutex_leave(db->mutex);
return pOld;
@@ -1827,10 +1827,10 @@ void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
/* Register a trace callback using the version-2 interface.
*/
int sqlite3_trace_v2(
sqlite3 *db, /* Trace this connection */
int(*xTrace)(unsigned,void*,void*,sqlite3_int64), /* Callback to invoke */
unsigned mTrace, /* OPs to be traced */
void *pArg /* Context */
sqlite3 *db, /* Trace this connection */
unsigned mTrace, /* Mask of events to be traced */
int(*xTrace)(unsigned,void*,void*,void*), /* Callback to invoke */
void *pArg /* Context */
){
#ifdef SQLITE_ENABLE_API_ARMOR
if( !sqlite3SafetyCheckOk(db) ){