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

If a rollback fails, mark the database as corrupt. (CVS 5668)

FossilOrigin-Name: c8b24bd1be94b6d385e759a2f9e202be066578a0
This commit is contained in:
drh
2008-09-03 00:08:29 +00:00
parent afacce0a4d
commit a9625eaeb9
3 changed files with 13 additions and 8 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.486 2008/09/02 11:05:02 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.487 2008/09/03 00:08:29 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -1492,6 +1492,11 @@ static int pager_playback(Pager *pPager, int isHot){
pPager->journalOff = szJ;
break;
}else{
/* If we are unable to rollback, then the database is probably
** going to end up being corrupt. It is corrupt to us, anyhow.
** Perhaps the next process to come along can fix it....
*/
rc = SQLITE_CORRUPT;
goto end_playback;
}
}