mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Changes to pager for improved testability.
FossilOrigin-Name: 61c64b3aeb027fcc9c25591d6b9048ac7850ad3d
This commit is contained in:
24
manifest
24
manifest
@@ -1,5 +1,8 @@
|
|||||||
C Add\stests\sfor\sthe\sBETWEEN\soperator\sto\se_expr.test.
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
D 2010-08-17T16:06:09
|
Hash: SHA1
|
||||||
|
|
||||||
|
C Changes\sto\spager\sfor\simproved\stestability.
|
||||||
|
D 2010-08-17T17:25:16
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
|
F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -156,7 +159,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
|
|||||||
F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e
|
F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e
|
||||||
F src/os_unix.c 11194cbcf6a57456e58022dc537ab8c3497d9bb9
|
F src/os_unix.c 11194cbcf6a57456e58022dc537ab8c3497d9bb9
|
||||||
F src/os_win.c 51cb62f76262d961ea4249489383d714501315a7
|
F src/os_win.c 51cb62f76262d961ea4249489383d714501315a7
|
||||||
F src/pager.c 5a4fdd063b71f9cd9b5f561fd205941167efeb83
|
F src/pager.c ddef1e661fbfe6b13d43273c7672485f6fb847cd
|
||||||
F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd
|
F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd
|
||||||
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
|
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
|
||||||
F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07
|
F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07
|
||||||
@@ -843,7 +846,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P e05089aaefe02ec59a1923812349471a78075d29
|
P ced6a3480fe4a8e2b93160a8419bdc3ab30935e8
|
||||||
R f6617952e848f11c3cd7a85d48d9906b
|
R 19bc85b7e2e305b82c7339594075ff01
|
||||||
U dan
|
U drh
|
||||||
Z 2833d70ff5cee480c0ad0f9b9cb3be0b
|
Z dae19f7cd7281f0d754f22f429e4dd6e
|
||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||||
|
|
||||||
|
iD8DBQFMasX/oxKgR168RlERAuYYAJ94C2NzLusQUE3WIvzLfo497U9Q8gCeJk0U
|
||||||
|
4T7U1ZESZl2eGMwQ7nWcsfI=
|
||||||
|
=+h/y
|
||||||
|
-----END PGP SIGNATURE-----
|
||||||
|
@@ -1 +1 @@
|
|||||||
ced6a3480fe4a8e2b93160a8419bdc3ab30935e8
|
61c64b3aeb027fcc9c25591d6b9048ac7850ad3d
|
14
src/pager.c
14
src/pager.c
@@ -2216,8 +2216,8 @@ static int pager_playback_one_page(
|
|||||||
}else{
|
}else{
|
||||||
isSynced = (pPg==0 || 0==(pPg->flags & PGHDR_NEED_SYNC));
|
isSynced = (pPg==0 || 0==(pPg->flags & PGHDR_NEED_SYNC));
|
||||||
}
|
}
|
||||||
if( (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)
|
if( isOpen(pPager->fd)
|
||||||
&& isOpen(pPager->fd)
|
&& (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)
|
||||||
&& isSynced
|
&& isSynced
|
||||||
){
|
){
|
||||||
i64 ofst = (pgno-1)*(i64)pPager->pageSize;
|
i64 ofst = (pgno-1)*(i64)pPager->pageSize;
|
||||||
@@ -2595,7 +2595,7 @@ static int pager_playback(Pager *pPager, int isHot){
|
|||||||
*/
|
*/
|
||||||
assert( isOpen(pPager->jfd) );
|
assert( isOpen(pPager->jfd) );
|
||||||
rc = sqlite3OsFileSize(pPager->jfd, &szJ);
|
rc = sqlite3OsFileSize(pPager->jfd, &szJ);
|
||||||
if( rc!=SQLITE_OK || szJ==0 ){
|
if( rc!=SQLITE_OK ){
|
||||||
goto end_playback;
|
goto end_playback;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2629,7 +2629,7 @@ static int pager_playback(Pager *pPager, int isHot){
|
|||||||
while( 1 ){
|
while( 1 ){
|
||||||
/* Read the next journal header from the journal file. If there are
|
/* Read the next journal header from the journal file. If there are
|
||||||
** not enough bytes left in the journal file for a complete header, or
|
** not enough bytes left in the journal file for a complete header, or
|
||||||
** it is corrupted, then a process must of failed while writing it.
|
** it is corrupted, then a process must have failed while writing it.
|
||||||
** This indicates nothing more needs to be rolled back.
|
** This indicates nothing more needs to be rolled back.
|
||||||
*/
|
*/
|
||||||
rc = readJournalHdr(pPager, isHot, szJ, &nRec, &mxPg);
|
rc = readJournalHdr(pPager, isHot, szJ, &nRec, &mxPg);
|
||||||
@@ -5106,7 +5106,9 @@ static int pager_open_journal(Pager *pPager){
|
|||||||
*/
|
*/
|
||||||
int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory){
|
int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
assert( pPager->eState>=PAGER_READER );
|
|
||||||
|
if( pPager->errCode ) return pPager->errCode;
|
||||||
|
assert( pPager->eState>=PAGER_READER && pPager->eState<PAGER_ERROR );
|
||||||
pPager->subjInMemory = (u8)subjInMemory;
|
pPager->subjInMemory = (u8)subjInMemory;
|
||||||
|
|
||||||
if( ALWAYS(pPager->eState==PAGER_READER) ){
|
if( ALWAYS(pPager->eState==PAGER_READER) ){
|
||||||
@@ -5626,7 +5628,7 @@ int sqlite3PagerCommitPhaseOne(
|
|||||||
assert( assert_pager_state(pPager) );
|
assert( assert_pager_state(pPager) );
|
||||||
|
|
||||||
/* If a prior error occurred, report that error again. */
|
/* If a prior error occurred, report that error again. */
|
||||||
if( pPager->errCode ) return pPager->errCode;
|
if( NEVER(pPager->errCode) ) return pPager->errCode;
|
||||||
|
|
||||||
PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n",
|
PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n",
|
||||||
pPager->zFilename, zMaster, pPager->dbSize));
|
pPager->zFilename, zMaster, pPager->dbSize));
|
||||||
|
Reference in New Issue
Block a user