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

Add the vdbe_listing and sql_trace pragmas used for debugging. (CVS 1558)

FossilOrigin-Name: 28c3cc088018833f507535b8d227232776cff204
This commit is contained in:
drh
2004-06-10 01:30:59 +00:00
parent a60accbdb2
commit 35d4c2f4b8
8 changed files with 45 additions and 21 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.211 2004/06/10 00:29:09 drh Exp $
** $Id: main.c,v 1.212 2004/06/10 01:30:59 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -931,6 +931,16 @@ int sqlite3_prepare(
}
}
/* Print a copy of SQL as it is executed if the SQL_TRACE pragma is turned
** on in debugging mode.
*/
#ifdef SQLITE_DEBUG
if( (db->flags & SQLITE_SqlTrace)!=0 && sParse.zTail && sParse.zTail!=zSql ){
sqlite3DebugPrintf("SQL-trace: %.*s\n", sParse.zTail - zSql, zSql);
}
#endif /* SQLITE_DEBUG */
if( sqlite3_malloc_failed ){
rc = SQLITE_NOMEM;
sqlite3RollbackAll(db);