/ Check-in [8e878c20]
Login

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

Overview
Comment:Correctly detect errors returned by walCheckpointStart() due to OOM.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ota-update
Files: files | file ages | folders
SHA1: 8e878c20238ecf60e5d98d088a955e834ffd35c1
User & Date: drh 2015-01-28 12:27:35
Context
2015-01-28
15:30
When a "full", "restart" or "truncate" checkpoint is attempted, return SQLITE_BUSY if a reader prevents the checkpointer from copying any frames at all into the database file. check-in: f2700040 user: dan tags: ota-update
12:27
Correctly detect errors returned by walCheckpointStart() due to OOM. check-in: 8e878c20 user: drh tags: ota-update
12:00
Merge in all changes from trunk. check-in: 17c69be8 user: drh tags: ota-update
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  1905   1905     WalCkpt sC;
  1906   1906   
  1907   1907     /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked
  1908   1908     ** in the SQLITE_CHECKPOINT_PASSIVE mode. */
  1909   1909     assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );
  1910   1910   
  1911   1911     rc = walCheckpointStart(pWal, zBuf, nBuf, xBusy, pBusyArg, sync_flags, &sC);
  1912         -  if( sC.pIter==0 ) goto walcheckpoint_out;
  1913         -  assert( rc==SQLITE_OK );
         1912  +  if( sC.pIter==0 || rc!=SQLITE_OK ) goto walcheckpoint_out;
  1914   1913   
  1915   1914     /* Step the checkpoint object until it reports something other than 
  1916   1915     ** SQLITE_OK.  */
  1917   1916     while( SQLITE_OK==(rc = walCheckpointStep(&sC)) );
  1918   1917     rc = walCheckpointFinalize(&sC);
  1919   1918   
  1920   1919     /* If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the