mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add the experimental sqlite3_transaction_hook() API.
FossilOrigin-Name: 093d8cd8e2f3a6af5d40cf810e396f4919eb5cef
This commit is contained in:
@@ -401,7 +401,15 @@ static int sqlite3Step(Vdbe *p){
|
||||
#endif
|
||||
|
||||
db->activeVdbeCnt++;
|
||||
if( p->readOnly==0 ) db->writeVdbeCnt++;
|
||||
if( p->readOnly==0 ){
|
||||
/* If this statement will open an implicit transaction, invoke the
|
||||
** transaction-hook here. */
|
||||
if( db->autoCommit && db->writeVdbeCnt==0 ){
|
||||
assert( db->nSavepoint==0 );
|
||||
sqlite3TransactionHook(db, SQLITE_BEGIN, 0);
|
||||
}
|
||||
db->writeVdbeCnt++;
|
||||
}
|
||||
p->pc = 0;
|
||||
}
|
||||
#ifndef SQLITE_OMIT_EXPLAIN
|
||||
|
Reference in New Issue
Block a user