SQLite

Check-in [158a309737]
Login

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

Overview
Comment:In WAL mode, ignore any error returned by an xFileControl(FCNTL_SIZE_HINT) call. This matches the behaviour in rollback mode.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: 158a309737bd4cdc033cd504a6d0cc43c15b6e17
User & Date: dan 2010-08-09 07:07:38.000
Context
2010-08-09
07:51
Fix a problem causing the return code of an xSync call to be ignored in wal.c. (check-in: f1b2b5f9c3 user: dan tags: experimental)
07:07
In WAL mode, ignore any error returned by an xFileControl(FCNTL_SIZE_HINT) call. This matches the behaviour in rollback mode. (check-in: 158a309737 user: dan tags: experimental)
2010-08-07
16:17
Fix minor problems and update comments in pager.c. (check-in: 92e456374b user: dan tags: experimental)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/wal.c.
1578
1579
1580
1581
1582
1583
1584
1585

1586
1587
1588
1589
1590
1591
1592
1578
1579
1580
1581
1582
1583
1584

1585
1586
1587
1588
1589
1590
1591
1592







-
+








    /* If the database file may grow as a result of this checkpoint, hint
    ** about the eventual size of the db file to the VFS layer. 
    */
    nReq = ((i64)mxPage * szPage);
    rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
    if( rc==SQLITE_OK && nSize<nReq ){
      rc = sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
      sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
    }

    /* Iterate through the contents of the WAL, copying data to the db file. */
    while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
      i64 iOffset;
      assert( walFramePgno(pWal, iFrame)==iDbpage );
      if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;