/ Check-in [9b79a390]
Login

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

Overview
Comment:Do not attempt to flush the pages of an in-memory database to disk if sqlite3_db_cacheflush() is called.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | cacheflush
Files: files | file ages | folders
SHA1:9b79a390440a23542a370b591e567b31ebb35c42
User & Date: dan 2015-10-29 21:11:22
Context
2015-10-30
09:13
Test that calling sqlite3_db_cacheflush() does not interfere with savepoints. check-in: 0e09e4a2 user: dan tags: cacheflush
2015-10-29
21:11
Do not attempt to flush the pages of an in-memory database to disk if sqlite3_db_cacheflush() is called. check-in: 9b79a390 user: dan tags: cacheflush
20:57
Add a test case that calls sqlite3_db_cacheflush() on an in-memory database. check-in: f0cdfb54 user: dan tags: cacheflush
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/pager.c.

4474
4475
4476
4477
4478
4479
4480

4481
4482
4483
4484
4485
4486
4487
4488
4489

4490
4491
4492
4493
4494
4495
4496
}

/*
** Flush all unreferenced dirty pages to disk.
*/
int sqlite3PagerFlush(Pager *pPager){
  int rc = pPager->errCode;

  PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);

  assert( assert_pager_state(pPager) );
  while( rc==SQLITE_OK && pList ){
    PgHdr *pNext = pList->pDirty;
    if( pList->nRef==0 ){
      rc = pagerStress((void*)pPager, pList);
    }
    pList = pNext;

  }

  return rc;
}

/*
** Allocate and initialize a new Pager object and put a pointer to it







>
|
<
|
|
|
|
|
|
|
>







4474
4475
4476
4477
4478
4479
4480
4481
4482

4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
}

/*
** Flush all unreferenced dirty pages to disk.
*/
int sqlite3PagerFlush(Pager *pPager){
  int rc = pPager->errCode;
  if( !MEMDB ){
    PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);

    assert( assert_pager_state(pPager) );
    while( rc==SQLITE_OK && pList ){
      PgHdr *pNext = pList->pDirty;
      if( pList->nRef==0 ){
        rc = pagerStress((void*)pPager, pList);
      }
      pList = pNext;
    }
  }

  return rc;
}

/*
** Allocate and initialize a new Pager object and put a pointer to it