1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Allow read transactions to be freely opened and closed by SQL statements run from within the implementation of user-functions if the user-function is called by a SELECT statement that does not access any database tables (e.g. "SELECT user_function();").

FossilOrigin-Name: f308c4851726b4b75636f714466f2314f56e3ec0
This commit is contained in:
dan
2013-06-28 19:41:43 +00:00
parent 40aa936f7f
commit c0537fe59b
6 changed files with 26 additions and 20 deletions

View File

@@ -3279,7 +3279,7 @@ static void btreeEndTransaction(Btree *p){
#ifndef SQLITE_OMIT_AUTOVACUUM
pBt->bDoTruncate = 0;
#endif
if( p->inTrans>TRANS_NONE && db->nVdbeActive>1 ){
if( p->inTrans>TRANS_NONE && db->nVdbeRead>1 ){
/* If there are other active statements that belong to this database
** handle, downgrade to a read-only transaction. The other statements
** may still be reading from the database. */