1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Tentative fix for ticket #1567: disable the sqlite3pager_dont_write()

optimization when a statement transaction is active.  We continue to look
for a better fix. (CVS 2827)

FossilOrigin-Name: e6106cc133e5210bfa248d811122e9bf7d6f2b7c
This commit is contained in:
drh
2005-12-19 16:15:31 +00:00
parent 0190d1da46
commit 8f9b728b62
4 changed files with 62 additions and 10 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.226 2005/12/19 14:18:11 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.227 2005/12/19 16:15:31 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3119,7 +3119,7 @@ void sqlite3pager_dont_write(Pager *pPager, Pgno pgno){
pPg = pager_lookup(pPager, pgno);
pPg->alwaysRollback = 1;
if( pPg && pPg->dirty ){
if( pPg && pPg->dirty && !pPager->stmtInUse ){
if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSize<pPager->dbSize ){
/* If this pages is the last page in the file and the file has grown
** during the current transaction, then do NOT mark the page as clean.