1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +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

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.256 2004/08/29 20:08:59 drh Exp $
** $Id: main.c,v 1.257 2004/09/02 14:57:08 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -521,7 +521,6 @@ void sqlite3RollbackAll(sqlite *db){
}
}
sqlite3ResetInternalSchema(db, 0);
/* sqlite3RollbackInternalChanges(db); */
}
/*
@@ -987,7 +986,7 @@ int sqlite3_prepare(
** Make a copy of that part of the SQL string since zSQL is const
** and we must pass a zero terminated string to the trace function
** The copy is unnecessary if the tail pointer is pointing at the
** beginnig or end of the SQL string.
** beginning or end of the SQL string.
*/
if( sParse.zTail && sParse.zTail!=zSql && *sParse.zTail ){
char *tmpSql = sqliteStrNDup(zSql, sParse.zTail - zSql);