9405dda613Add trace support.
* sqlite3.scm.in (SQLITE_TRACE_STMT, SQLITE_TRACE_PROFILE,
SQLITE_TRACE_ROW, SQLITE_TRACE_CLOSE): New variables,
(sqlite-expanded-sql, sqlite-trace): new procedures.
* tests/basic.scm ("trace"): New associated test case.
e4325a6858Make it possible to sqlite-finalize the same statement twice.
* sqlite3.scm.in (sqlite-finalize): Make it possible to finalize twice.
* tests/basic.scm: Add test for finalizing the same statement twice.
c59db66f9aReset statement when sqlite-finalize is called on cached statement
Automatically-started transactions only end when a statement finishes, which is
normally either when sqlite-reset or sqlite-finalize is called for that
statement. Consequently, transactions automatically started by cached
statements won't end until the statement is next reused by sqlite-prepare or
sqlite-reset is called on it. This changes sqlite-finalize so that it preserves
the statement-finishing (and thus transaction-finishing) behavior of
sqlite_finalize.