/ Check-in [aa16eb57]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not set the pager to persistent error state if a call to OsAccess() fails. (CVS 5004)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:aa16eb572915632bfff88d544f9c428ca723346e
User & Date: danielk1977 2008-04-14 16:37:10
Context
2008-04-14
17:42
Fix alignment issue in instrumentation code. (CVS 5005) check-in: c9e0d625 user: danielk1977 tags: trunk
16:37
Do not set the pager to persistent error state if a call to OsAccess() fails. (CVS 5004) check-in: aa16eb57 user: danielk1977 tags: trunk
15:27
Make sure the page size in crash6.test does not exceed the maximum configured page size. (CVS 5003) check-in: 36b6610b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
....
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
** The pager is used to access a database disk file.  It implements
** atomic commit and rollback through the use of a journal file that
** is separate from the database file.  The pager also implements file
** locking to prevent two processes from writing the same database
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.424 2008/04/14 01:00:58 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include <assert.h>
#include <string.h>

/*
................................................................................
      }
  
      /* If a journal file exists, and there is no RESERVED lock on the
      ** database file, then it either needs to be played back or deleted.
      */
      rc = hasHotJournal(pPager);
      if( rc<0 ){
        return pager_error(pPager, SQLITE_IOERR_NOMEM);
      }
      if( rc==1 || isHot ){
        /* Get an EXCLUSIVE lock on the database file. At this point it is
        ** important that a RESERVED lock is not obtained on the way to the
        ** EXCLUSIVE lock. If it were, another process might open the
        ** database file, detect the RESERVED lock, and conclude that the
        ** database is safe to read while this process is still rolling it 







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
....
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
** The pager is used to access a database disk file.  It implements
** atomic commit and rollback through the use of a journal file that
** is separate from the database file.  The pager also implements file
** locking to prevent two processes from writing the same database
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.425 2008/04/14 16:37:10 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include <assert.h>
#include <string.h>

/*
................................................................................
      }
  
      /* If a journal file exists, and there is no RESERVED lock on the
      ** database file, then it either needs to be played back or deleted.
      */
      rc = hasHotJournal(pPager);
      if( rc<0 ){
        return SQLITE_IOERR_NOMEM;
      }
      if( rc==1 || isHot ){
        /* Get an EXCLUSIVE lock on the database file. At this point it is
        ** important that a RESERVED lock is not obtained on the way to the
        ** EXCLUSIVE lock. If it were, another process might open the
        ** database file, detect the RESERVED lock, and conclude that the
        ** database is safe to read while this process is still rolling it