1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Transactions commit on the last sqlite3_step(), not on sqlite3_finalize().

This allows the sqlite3_step() to return SQLITE_BUSY if the commit is
blocked by a lock.  Ticket #885. (CVS 1928)

FossilOrigin-Name: d1b29156558f1c576002cdb2544dffaa693da39b
This commit is contained in:
drh
2004-09-02 14:57:08 +00:00
parent 66cbd1543b
commit 92f02c31d4
12 changed files with 240 additions and 100 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.161 2004/08/30 16:52:18 drh Exp $
** @(#) $Id: pager.c,v 1.162 2004/09/02 14:57:08 drh Exp $
*/
#include "os.h" /* Must be first to enable large file support */
#include "sqliteInt.h"
@@ -2798,10 +2798,7 @@ int sqlite3pager_commit(Pager *pPager){
/* Jump here if anything goes wrong during the commit process.
*/
commit_abort:
rc = sqlite3pager_rollback(pPager);
if( rc==SQLITE_OK ){
rc = SQLITE_FULL;
}
sqlite3pager_rollback(pPager);
return rc;
}