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

Add testing for sqlite3_trace() and fix a bug. (CVS 1760)

FossilOrigin-Name: 7a15391079ae9ce5360fa13e8779c8872885e789
This commit is contained in:
drh
2004-06-29 11:26:59 +00:00
parent fd69dd6b3d
commit b97759ed11
5 changed files with 59 additions and 11 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.240 2004/06/29 10:53:55 drh Exp $
** $Id: main.c,v 1.241 2004/06/29 11:26:59 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -981,7 +981,7 @@ int sqlite3_prepare(
char *tmpSql = sqliteStrNDup(zSql, sParse.zTail - zSql);
if( tmpSql ){
db->xTrace(db->pTraceArg, tmpSql);
free(tmpSql);
sqliteFree(tmpSql);
}else{
/* If a memory error occurred during the copy,
** trace entire SQL string and fall through to the