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

Add automatic recovery from the pager "error-state". Also add a new error code - SQLITE_IOERR_NOMEM. (CVS 4454)

FossilOrigin-Name: 12eca32a6a3d68d5b20eed03afdffe7599e66014
This commit is contained in:
danielk1977
2007-10-03 08:46:44 +00:00
parent ae1463b941
commit ae72d98252
21 changed files with 319 additions and 132 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.404 2007/09/03 15:19:35 drh Exp $
** $Id: main.c,v 1.405 2007/10/03 08:46:45 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -234,6 +234,7 @@ void sqlite3RollbackAll(sqlite3 *db){
int i;
int inTrans = 0;
assert( sqlite3_mutex_held(db->mutex) );
sqlite3MallocEnterBenignBlock(1); /* Enter benign region */
for(i=0; i<db->nDb; i++){
if( db->aDb[i].pBt ){
if( sqlite3BtreeIsInTrans(db->aDb[i].pBt) ){
@@ -244,6 +245,8 @@ void sqlite3RollbackAll(sqlite3 *db){
}
}
sqlite3VtabRollback(db);
sqlite3MallocLeaveBenignBlock(0); /* Leave benign region */
if( db->flags&SQLITE_InternChanges ){
sqlite3ExpirePreparedStatements(db);
sqlite3ResetInternalSchema(db, 0);