/ Check-in [75deaa442f]
Login

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

Overview
Comment:Remove an obsolete layer of redirection in pager.c. (CVS 5723)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 75deaa442f3a363c4ea5b6f0e510306feeaa8915
User & Date: danielk1977 2008-09-19 09:14:44
Context
2008-09-19
15:10
In sqlite3BtreeGetMeta(), if BtShared.pPage1 is available use it instead of requesting a new reference from the pager layer. (CVS 5724) check-in: 59be34cfa4 user: danielk1977 tags: trunk
09:14
Remove an obsolete layer of redirection in pager.c. (CVS 5723) check-in: 75deaa442f user: danielk1977 tags: trunk
2008-09-18
18:18
Do not run the async tests if the async module is not installed. (CVS 5722) check-in: 4de71a4e2f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

    14     14   ** The pager is used to access a database disk file.  It implements
    15     15   ** atomic commit and rollback through the use of a journal file that
    16     16   ** is separate from the database file.  The pager also implements file
    17     17   ** locking to prevent two processes from writing the same database
    18     18   ** file simultaneously, or one process from reading the database while
    19     19   ** another is writing.
    20     20   **
    21         -** @(#) $Id: pager.c,v 1.492 2008/09/18 17:34:44 danielk1977 Exp $
           21  +** @(#) $Id: pager.c,v 1.493 2008/09/19 09:14:44 danielk1977 Exp $
    22     22   */
    23     23   #ifndef SQLITE_OMIT_DISKIO
    24     24   #include "sqliteInt.h"
    25     25   
    26     26   /*
    27     27   ** Macros for troubleshooting.  Normally turned off
    28     28   */
................................................................................
  2789   2789   ** of the page at this time, so do not do a disk read.  Just fill in the
  2790   2790   ** page content with zeros.  But mark the fact that we have not read the
  2791   2791   ** content by setting the PgHdr.needRead flag.  Later on, if 
  2792   2792   ** sqlite3PagerWrite() is called on this page or if this routine is
  2793   2793   ** called again with noContent==0, that means that the content is needed
  2794   2794   ** and the disk read should occur at that point.
  2795   2795   */
  2796         -static int pagerAcquire(
         2796  +int sqlite3PagerAcquire(
  2797   2797     Pager *pPager,      /* The pager open on the database file */
  2798   2798     Pgno pgno,          /* Page number to fetch */
  2799   2799     DbPage **ppPage,    /* Write a pointer to the page here */
  2800   2800     int noContent       /* Do not bother reading content from disk if true */
  2801   2801   ){
  2802   2802     PgHdr *pPg = 0;
  2803   2803     int rc;
................................................................................
  2885   2885         }
  2886   2886       }
  2887   2887     }
  2888   2888   
  2889   2889     *ppPage = pPg;
  2890   2890     return SQLITE_OK;
  2891   2891   }
  2892         -
  2893         -int sqlite3PagerAcquire(
  2894         -  Pager *pPager,      /* The pager open on the database file */
  2895         -  Pgno pgno,          /* Page number to fetch */
  2896         -  DbPage **ppPage,    /* Write a pointer to the page here */
  2897         -  int noContent       /* Do not bother reading content from disk if true */
  2898         -){
  2899         -  int rc;
  2900         -  rc = pagerAcquire(pPager, pgno, ppPage, noContent);
  2901         -  return rc;
  2902         -}
  2903         -
  2904   2892   
  2905   2893   /*
  2906   2894   ** Acquire a page if it is already in the in-memory cache.  Do
  2907   2895   ** not read the page from disk.  Return a pointer to the page,
  2908   2896   ** or 0 if the page is not in cache.
  2909   2897   **
  2910   2898   ** See also sqlite3PagerGet().  The difference between this routine