mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a problem causing builds with SQLITE_OMIT_WAL defined to fail.
FossilOrigin-Name: b9b48dd8ddceec009b5a22a3699e1524542c004a
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\scase\sin\sfts4\swhere\sa\scorrupt\s%_stat\stable\scould\slead\sto\sa\scrash.
|
C Fix\sa\sproblem\scausing\sbuilds\swith\sSQLITE_OMIT_WAL\sdefined\sto\sfail.
|
||||||
D 2011-02-01T17:55:48.046
|
D 2011-02-01T18:00:43.271
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
|
F Makefile.in de6498556d536ae60bb8bb10e8c1ba011448658c
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -162,7 +162,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f
|
|||||||
F src/os_os2.c 2e452c9f2ca507623ad351c33a8a8b27849b1863
|
F src/os_os2.c 2e452c9f2ca507623ad351c33a8a8b27849b1863
|
||||||
F src/os_unix.c 1be46a35bad4bec5171e4de88aaff817260eb378
|
F src/os_unix.c 1be46a35bad4bec5171e4de88aaff817260eb378
|
||||||
F src/os_win.c 9abdcdd925416d854eabb0996c96debd92abfef5
|
F src/os_win.c 9abdcdd925416d854eabb0996c96debd92abfef5
|
||||||
F src/pager.c b0fcbe3038fd08b111e1cf1deddd5f42418004d8
|
F src/pager.c c22b8531596c984dcc6b90645714b7ed951023fe
|
||||||
F src/pager.h 0ea59db2a33bc6c2c02cae34de33367e1effdf76
|
F src/pager.h 0ea59db2a33bc6c2c02cae34de33367e1effdf76
|
||||||
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
|
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
|
||||||
F src/pcache.c 09d38c44ab275db581f7a2f6ff8b9bc7f8c0faaa
|
F src/pcache.c 09d38c44ab275db581f7a2f6ff8b9bc7f8c0faaa
|
||||||
@@ -900,7 +900,7 @@ 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 b010ddcc52889160af2183a33c5f483bb0ae91b9
|
P 4ade96ce974244fc34bb97713d3cba10e3d33056
|
||||||
R 6357f23d94d26bf10b5519ed6d9a80e0
|
R cf616bd9d5d6b4778f7580e251dfc563
|
||||||
U dan
|
U dan
|
||||||
Z 1245dae65401ccee7f129f9a4e09755d
|
Z c6308069adad7ddbe7a456bda546fcf0
|
||||||
|
@@ -1 +1 @@
|
|||||||
4ade96ce974244fc34bb97713d3cba10e3d33056
|
b9b48dd8ddceec009b5a22a3699e1524542c004a
|
45
src/pager.c
45
src/pager.c
@@ -2851,6 +2851,28 @@ static int readDbPage(PgHdr *pPg){
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Update the value of the change-counter at offsets 24 and 92 in
|
||||||
|
** the header and the sqlite version number at offset 96.
|
||||||
|
**
|
||||||
|
** This is an unconditional update. See also the pager_incr_changecounter()
|
||||||
|
** routine which only updates the change-counter if the update is actually
|
||||||
|
** needed, as determined by the pPager->changeCountDone state variable.
|
||||||
|
*/
|
||||||
|
static void pager_write_changecounter(PgHdr *pPg){
|
||||||
|
u32 change_counter;
|
||||||
|
|
||||||
|
/* Increment the value just read and write it back to byte 24. */
|
||||||
|
change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1;
|
||||||
|
put32bits(((char*)pPg->pData)+24, change_counter);
|
||||||
|
|
||||||
|
/* Also store the SQLite version number in bytes 96..99 and in
|
||||||
|
** bytes 92..95 store the change counter for which the version number
|
||||||
|
** is valid. */
|
||||||
|
put32bits(((char*)pPg->pData)+92, change_counter);
|
||||||
|
put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_WAL
|
#ifndef SQLITE_OMIT_WAL
|
||||||
/*
|
/*
|
||||||
** This function is invoked once for each page that has already been
|
** This function is invoked once for each page that has already been
|
||||||
@@ -2921,29 +2943,6 @@ static int pagerRollbackWal(Pager *pPager){
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Update the value of the change-counter at offsets 24 and 92 in
|
|
||||||
** the header and the sqlite version number at offset 96.
|
|
||||||
**
|
|
||||||
** This is an unconditional update. See also the pager_incr_changecounter()
|
|
||||||
** routine which only updates the change-counter if the update is actually
|
|
||||||
** needed, as determined by the pPager->changeCountDone state variable.
|
|
||||||
*/
|
|
||||||
static void pager_write_changecounter(PgHdr *pPg){
|
|
||||||
u32 change_counter;
|
|
||||||
|
|
||||||
/* Increment the value just read and write it back to byte 24. */
|
|
||||||
change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1;
|
|
||||||
put32bits(((char*)pPg->pData)+24, change_counter);
|
|
||||||
|
|
||||||
/* Also store the SQLite version number in bytes 96..99 and in
|
|
||||||
** bytes 92..95 store the change counter for which the version number
|
|
||||||
** is valid. */
|
|
||||||
put32bits(((char*)pPg->pData)+92, change_counter);
|
|
||||||
put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This function is a wrapper around sqlite3WalFrames(). As well as logging
|
** This function is a wrapper around sqlite3WalFrames(). As well as logging
|
||||||
** the contents of the list of pages headed by pList (connected by pDirty),
|
** the contents of the list of pages headed by pList (connected by pDirty),
|
||||||
|
Reference in New Issue
Block a user