/ Check-in [fe0920c7]
Login

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

Overview
Comment:Work around a bug in GCC 4.0.2. (CVS 3154)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fe0920c7922bfdbefbc0107fb9170d98bec2dcef
User & Date: drh 2006-03-26 20:49:18
Context
2006-03-28
00:24
Extra asserts to prove that certain reported errors in btree.c are not really errors. (CVS 3155) check-in: c64542d0 user: drh tags: trunk
2006-03-26
20:49
Work around a bug in GCC 4.0.2. (CVS 3154) check-in: fe0920c7 user: drh tags: trunk
01:21
SQLite now always chooses the column names for compound selects using the left-most select. This makes SQLite work like other SQL database, but it also is a change from historical behavior and may break some scripts. Ticket #1721. (CVS 3153) check-in: 80cda9f7 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
....
1805
1806
1807
1808
1809
1810
1811

1812
1813
1814
1815
1816
1817
1818
....
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
** 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.264 2006/03/23 23:29:04 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include "os.h"
#include "pager.h"
#include <assert.h>
#include <string.h>
................................................................................
  return n;
}

/*
** Forward declaration
*/
static int syncJournal(Pager*);



/*
** Unlink pPg from it's hash chain. Also set the page number to 0 to indicate
** that the page is not part of any hash chain. This is required because the
** sqlite3pager_movepage() routine can leave a page in the 
** pNextFree/pPrevFree list that is not a part of any hash-chain.
................................................................................
    pPg->pPrevHash->pNextHash = pPg->pNextHash;
  }else{
    int h = pager_hash(pPg->pgno);
    assert( pPager->aHash[h]==pPg );
    pPager->aHash[h] = pPg->pNextHash;
  }
  if( MEMDB ){
    static void clearHistory(PgHistory*);  /* Forward reference */
    clearHistory(PGHDR_TO_HIST(pPg, pPager));
  }
  pPg->pgno = 0;
  pPg->pNextHash = pPg->pPrevHash = 0;
}

/*







|







 







>







 







<







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
....
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
....
1831
1832
1833
1834
1835
1836
1837

1838
1839
1840
1841
1842
1843
1844
** 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.265 2006/03/26 20:49:18 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include "os.h"
#include "pager.h"
#include <assert.h>
#include <string.h>
................................................................................
  return n;
}

/*
** Forward declaration
*/
static int syncJournal(Pager*);
static void clearHistory(PgHistory*);


/*
** Unlink pPg from it's hash chain. Also set the page number to 0 to indicate
** that the page is not part of any hash chain. This is required because the
** sqlite3pager_movepage() routine can leave a page in the 
** pNextFree/pPrevFree list that is not a part of any hash-chain.
................................................................................
    pPg->pPrevHash->pNextHash = pPg->pNextHash;
  }else{
    int h = pager_hash(pPg->pgno);
    assert( pPager->aHash[h]==pPg );
    pPager->aHash[h] = pPg->pNextHash;
  }
  if( MEMDB ){

    clearHistory(PGHDR_TO_HIST(pPg, pPager));
  }
  pPg->pgno = 0;
  pPg->pNextHash = pPg->pPrevHash = 0;
}

/*