SQLite

Check-in [8e878c2023]
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
Timelines: family | ancestors | descendants | both | ota-update
Files: files | file ages | folders
SHA1: 8e878c20238ecf60e5d98d088a955e834ffd35c1
User & Date: drh 2015-01-28 12:27:35.926
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: f270004016 user: dan tags: ota-update)
12:27
Correctly detect errors returned by walCheckpointStart() due to OOM. (check-in: 8e878c2023 user: drh tags: ota-update)
12:00
Merge in all changes from trunk. (check-in: 17c69be805 user: drh tags: ota-update)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/wal.c.
1905
1906
1907
1908
1909
1910
1911
1912

1913
1914
1915
1916
1917
1918
1919
1920
1905
1906
1907
1908
1909
1910
1911

1912

1913
1914
1915
1916
1917
1918
1919







-
+
-







  WalCkpt sC;

  /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked
  ** in the SQLITE_CHECKPOINT_PASSIVE mode. */
  assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );

  rc = walCheckpointStart(pWal, zBuf, nBuf, xBusy, pBusyArg, sync_flags, &sC);
  if( sC.pIter==0 ) goto walcheckpoint_out;
  if( sC.pIter==0 || rc!=SQLITE_OK ) goto walcheckpoint_out;
  assert( rc==SQLITE_OK );

  /* Step the checkpoint object until it reports something other than 
  ** SQLITE_OK.  */
  while( SQLITE_OK==(rc = walCheckpointStep(&sC)) );
  rc = walCheckpointFinalize(&sC);

  /* If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the