I try use sqlite3_commit_hook to log query, get this issue: every auto commit transaction made the callback execute once except your next call is BEGIN TRANSACTION. For example: ```sql INSERT INTO t(v) VALUES(1); INSERT INTO t(v) VALUES(2); BEGIN TRANSACTION; INSERT INTO t(v) VALUES(3); INSERT INTO t(v) VALUES(4); COMMIT; ``` The callback should fired 3 times, but it only fire 2 times. the second query is skiped. Test on master branch.