/ Check-in [079daedb]
Login

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

Overview
Comment:Fix the experimental sqlite3_wal_info() API so that it works with wal2 mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | begin-concurrent-pnu-wal2
Files: files | file ages | folders
SHA3-256: 079daedbe440e712dc944aeef831ef6531d44096da406d52ce0d85a8a49618c5
User & Date: dan 2019-01-04 19:39:04
Wiki:begin-concurrent-pnu-wal2
Context
2019-01-11
15:00
Merge latest begin-concurrent-wal2 changes (documentation only). check-in: d0ab56a3 user: dan tags: begin-concurrent-pnu-wal2
2019-01-04
19:39
Fix the experimental sqlite3_wal_info() API so that it works with wal2 mode. check-in: 079daedb user: dan tags: begin-concurrent-pnu-wal2
19:25
Add the "-external" option to the tserver_test.tcl program.. check-in: ae7c5ed1 user: dan tags: begin-concurrent-pnu-wal2
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wal.c.

4963
4964
4965
4966
4967
4968
4969
4970
4971

4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984

/* 
** Return the values required by sqlite3_wal_info().
*/
int sqlite3WalInfo(Wal *pWal, u32 *pnPrior, u32 *pnFrame){
  int rc = SQLITE_OK;
  if( pWal ){
    *pnFrame = pWal->hdr.mxFrame;
    *pnPrior = pWal->nPriorFrame;

  }
  return rc;
}

/* 
** Return the journal mode used by this Wal object.
*/
int sqlite3WalJournalMode(Wal *pWal){
  assert( pWal );
  return (isWalMode2(pWal) ? PAGER_JOURNALMODE_WAL2 : PAGER_JOURNALMODE_WAL);
}

#endif /* #ifndef SQLITE_OMIT_WAL */







<

>













4963
4964
4965
4966
4967
4968
4969

4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984

/* 
** Return the values required by sqlite3_wal_info().
*/
int sqlite3WalInfo(Wal *pWal, u32 *pnPrior, u32 *pnFrame){
  int rc = SQLITE_OK;
  if( pWal ){

    *pnPrior = pWal->nPriorFrame;
    *pnFrame = walidxGetMxFrame(&pWal->hdr, walidxGetFile(&pWal->hdr));
  }
  return rc;
}

/* 
** Return the journal mode used by this Wal object.
*/
int sqlite3WalJournalMode(Wal *pWal){
  assert( pWal );
  return (isWalMode2(pWal) ? PAGER_JOURNALMODE_WAL2 : PAGER_JOURNALMODE_WAL);
}

#endif /* #ifndef SQLITE_OMIT_WAL */