/ Check-in [b09e3ea7]
Login

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

Overview
Comment:Add some extra timestamps to the experimental log output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | experimentalIoLog
Files: files | file ages | folders
SHA1: b09e3ea7b86ff65d749ff0b6c27e05fd3a5fadb1
User & Date: dan 2015-08-11 13:41:44
Context
2015-08-11
13:41
Add some extra timestamps to the experimental log output. Leaf check-in: b09e3ea7 user: dan tags: experimentalIoLog
10:59
Add a tcl interface for the experimental logging functionality. check-in: e844304d user: dan tags: experimentalIoLog
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/pager.c.

7094
7095
7096
7097
7098
7099
7100




7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
** or wal_blocking_checkpoint() API functions.
**
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog, int *pnCkpt){
  int rc = SQLITE_OK;
  if( pPager->pWal ){




    rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
        (eMode==SQLITE_CHECKPOINT_PASSIVE ? 0 : pPager->xBusyHandler),
        pPager->pBusyHandlerArg,
        pPager->ckptSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
        pnLog, pnCkpt
    );
    if( pPager->pLog ){
      const char *azType[] = { "passive", "full", "restart", "truncate" };
      sqlite3ExperimentalLog(pPager->pLog, "checkpoint %s %d %d",
                             azType[eMode], *pnLog, *pnCkpt);
    }
  }
  return rc;
}

int sqlite3PagerWalCallback(Pager *pPager){
  return sqlite3WalCallback(pPager->pWal);







>
>
>
>







<
|
|







7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111

7112
7113
7114
7115
7116
7117
7118
7119
7120
** or wal_blocking_checkpoint() API functions.
**
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog, int *pnCkpt){
  int rc = SQLITE_OK;
  if( pPager->pWal ){
    if( pPager->pLog ){
      const char *az[] = { "passive", "full", "restart", "truncate" };
      sqlite3ExperimentalLog(pPager->pLog, "start-checkpoint %s TM", az[eMode]);
    }
    rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
        (eMode==SQLITE_CHECKPOINT_PASSIVE ? 0 : pPager->xBusyHandler),
        pPager->pBusyHandlerArg,
        pPager->ckptSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
        pnLog, pnCkpt
    );
    if( pPager->pLog ){

      sqlite3ExperimentalLog(pPager->pLog, "end-checkpoint %d %d TM", 
          *pnLog, *pnCkpt);
    }
  }
  return rc;
}

int sqlite3PagerWalCallback(Pager *pPager){
  return sqlite3WalCallback(pPager->pWal);

Changes to src/vdbe.c.

6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537

  if( db->pLog && p->zSql ){
    char *z = sqlite3DbStrDup(db, p->zSql);
    int ii;
    for(ii=0; z[ii]; ii++){
      if( sqlite3Isspace(z[ii]) ) z[ii] = ' ';
    }
    sqlite3ExperimentalLog(db->pLog, "sql {%s}", z);
    sqlite3DbFree(db, z);
  }
#ifndef SQLITE_OMIT_TRACE
  if( db->xTrace
   && !p->doingRerun
   && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
  ){







|







6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537

  if( db->pLog && p->zSql ){
    char *z = sqlite3DbStrDup(db, p->zSql);
    int ii;
    for(ii=0; z[ii]; ii++){
      if( sqlite3Isspace(z[ii]) ) z[ii] = ' ';
    }
    sqlite3ExperimentalLog(db->pLog, "sql {%s} TM", z);
    sqlite3DbFree(db, z);
  }
#ifndef SQLITE_OMIT_TRACE
  if( db->xTrace
   && !p->doingRerun
   && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
  ){