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:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user