Remove the unused Pager.alwaysRollback flag. Fix a couple of comments in pager.c. (CVS 6161)
FossilOrigin-Name: 8f0672af8d7d46124d01e540eec7b43fc16dd552
This commit is contained in:
parent
ceb92adb9d
commit
02983931eb
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\san\sfaulty\sassertion\sinserted\sa\sfew\sdays\sago.\s(CVS\s6160)
|
||||
D 2009-01-10T17:02:03
|
||||
C Remove\sthe\sunused\sPager.alwaysRollback\sflag.\sFix\sa\scouple\sof\scomments\sin\spager.c.\s(CVS\s6161)
|
||||
D 2009-01-10T17:57:49
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -142,7 +142,7 @@ F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
|
||||
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
||||
F src/os_unix.c 7825c6178597713382d74adbf8c8c00ffcdc42d4
|
||||
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
|
||||
F src/pager.c 98c6b2aa232b397ccbcd8ad5a1887af1960de576
|
||||
F src/pager.c f53ff4e74071cd99a8a1af55712886b82910d0e2
|
||||
F src/pager.h 9870acb2d653848d90d765d7cbf163496d6c8111
|
||||
F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
|
||||
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
|
||||
@ -696,7 +696,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 64a8dcd8d6152108809e4d10c459f1de5d36a435
|
||||
R 7b65d75c1e2466a966ed478bca81db53
|
||||
U drh
|
||||
Z 40ffa60b829dc2606c8d956617c41646
|
||||
P 495f017e03f32420e6a6a7685125a86929cef142
|
||||
R 48ee6c0b6318c6ef213b106655e056a3
|
||||
U danielk1977
|
||||
Z d71addb3a72f5992b0a3fc17fb866408
|
||||
|
@ -1 +1 @@
|
||||
495f017e03f32420e6a6a7685125a86929cef142
|
||||
8f0672af8d7d46124d01e540eec7b43fc16dd552
|
25
src/pager.c
25
src/pager.c
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.546 2009/01/10 17:02:03 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.547 2009/01/10 17:57:49 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -183,7 +183,6 @@ struct Pager {
|
||||
u8 readOnly; /* True for a read-only database */
|
||||
u8 needSync; /* True if an fsync() is needed on the journal */
|
||||
u8 dirtyCache; /* True if cached pages have changed */
|
||||
u8 alwaysRollback; /* Disable DontRollback() for all pages */
|
||||
u8 memDb; /* True to inhibit all file I/O */
|
||||
u8 setMaster; /* True if a m-j name has been written to jrnl */
|
||||
u8 doNotSync; /* Boolean. While true, do not spill the cache */
|
||||
@ -3684,16 +3683,16 @@ int sqlite3PagerIswriteable(DbPage *pPg){
|
||||
** sqlite3PagerDontRollback() below, more than double the speed
|
||||
** of large INSERT operations and quadruple the speed of large DELETEs.
|
||||
**
|
||||
** When this routine is called, set the alwaysRollback flag to true.
|
||||
** Subsequent calls to sqlite3PagerDontRollback() for the same page
|
||||
** will thereafter be ignored. This is necessary to avoid a problem
|
||||
** where a page with data is added to the freelist during one part of
|
||||
** a transaction then removed from the freelist during a later part
|
||||
** of the same transaction and reused for some other purpose. When it
|
||||
** is first added to the freelist, this routine is called. When reused,
|
||||
** the sqlite3PagerDontRollback() routine is called. But because the
|
||||
** page contains critical data, we still need to be sure it gets
|
||||
** rolled back in spite of the sqlite3PagerDontRollback() call.
|
||||
** When this routine is called, set the bit corresponding to pDbPage in
|
||||
** the Pager.pAlwaysRollback bitvec. Subsequent calls to
|
||||
** sqlite3PagerDontRollback() for the same page will thereafter be ignored.
|
||||
** This is necessary to avoid a problem where a page with data is added to
|
||||
** the freelist during one part of a transaction then removed from the
|
||||
** freelist during a later part of the same transaction and reused for some
|
||||
** other purpose. When it is first added to the freelist, this routine is
|
||||
** called. When reused, the sqlite3PagerDontRollback() routine is called.
|
||||
** But because the page contains critical data, we still need to be sure it
|
||||
** gets rolled back in spite of the sqlite3PagerDontRollback() call.
|
||||
*/
|
||||
int sqlite3PagerDontWrite(DbPage *pDbPage){
|
||||
PgHdr *pPg = pDbPage;
|
||||
@ -3753,7 +3752,7 @@ void sqlite3PagerDontRollback(DbPage *pPg){
|
||||
assert( pPager->state>=PAGER_RESERVED );
|
||||
|
||||
/* If the journal file is not open, or DontWrite() has been called on
|
||||
** this page (DontWrite() sets the alwaysRollback flag), then this
|
||||
** this page (DontWrite() sets the Pager.pAlwaysRollback bit), then this
|
||||
** function is a no-op.
|
||||
*/
|
||||
if( pPager->journalOpen==0
|
||||
|
Loading…
x
Reference in New Issue
Block a user