Allow the journal_mode for in-memory databases to be either OFF or MEMORY,
not just MEMORY. (CVS 6448) FossilOrigin-Name: 11c77f4c2c2beee5267ea6e2f1a4bb845531b42c
This commit is contained in:
parent
eb0d629257
commit
5d73854b27
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
|||||||
C Clarify\sthe\smeanings\sof\sthe\sSQLITE_SYNC_NORMAL\sand\sSQLITE_SYNC_FULL\sflags\npassed\sinto\sthe\sxSync\smethod\sof\sthe\sVFS.\s\sComment\schanges\sonly\s-\sno\schanges\nto\scode.\s(CVS\s6447)
|
C Allow\sthe\sjournal_mode\sfor\sin-memory\sdatabases\sto\sbe\seither\sOFF\sor\sMEMORY,\nnot\sjust\sMEMORY.\s(CVS\s6448)
|
||||||
D 2009-04-04T14:04:58
|
D 2009-04-04T15:53:48
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@ -143,7 +143,7 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
|
|||||||
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
||||||
F src/os_unix.c 5d667f24615043c937a138faaed5f3e93b8619b0
|
F src/os_unix.c 5d667f24615043c937a138faaed5f3e93b8619b0
|
||||||
F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684
|
F src/os_win.c 524fe4c31c469531191857e8036ef59bfb52d684
|
||||||
F src/pager.c 34aeb87dc8177901d49dd02207828a2121064c25
|
F src/pager.c a8b53f7e4a821d5bc2e01477a5f10c9348ce1d7b
|
||||||
F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
|
F src/pager.h 0c9f3520c00d8a3b8e792ca56c9a11b6b02b4b0f
|
||||||
F src/parse.y 070215cf461ab917c23253a9cbf0903f2b0d8f19
|
F src/parse.y 070215cf461ab917c23253a9cbf0903f2b0d8f19
|
||||||
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
|
F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
|
||||||
@ -715,7 +715,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
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
|
||||||
P 65f9d3b948cd6ed4728ab49833b9f2fca96563a2
|
P c47aeb37a1c054a8e0444b95e29cb332599af2d8
|
||||||
R aa0c0c747dd6d50096255d1203d3fb59
|
R ae3e14723e90d8a65d36e9ebea09a9ef
|
||||||
U drh
|
U drh
|
||||||
Z 45ed7fb71b5c5e1381094e61ad851d68
|
Z 073192898ad0af334ccc18150893fe50
|
||||||
|
@ -1 +1 @@
|
|||||||
c47aeb37a1c054a8e0444b95e29cb332599af2d8
|
11c77f4c2c2beee5267ea6e2f1a4bb845531b42c
|
17
src/pager.c
17
src/pager.c
@ -18,7 +18,7 @@
|
|||||||
** file simultaneously, or one process from reading the database while
|
** file simultaneously, or one process from reading the database while
|
||||||
** another is writing.
|
** another is writing.
|
||||||
**
|
**
|
||||||
** @(#) $Id: pager.c,v 1.576 2009/03/31 02:54:40 drh Exp $
|
** @(#) $Id: pager.c,v 1.577 2009/04/04 15:53:48 drh Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef SQLITE_OMIT_DISKIO
|
#ifndef SQLITE_OMIT_DISKIO
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
@ -5186,12 +5186,14 @@ int sqlite3PagerLockingMode(Pager *pPager, int eMode){
|
|||||||
** PAGER_JOURNALMODE_MEMORY
|
** PAGER_JOURNALMODE_MEMORY
|
||||||
**
|
**
|
||||||
** If the parameter is not _QUERY, then the journal-mode is set to the
|
** If the parameter is not _QUERY, then the journal-mode is set to the
|
||||||
** value specified.
|
** value specified. Except, an in-memory database can only have its
|
||||||
|
** journal mode set to _OFF or _MEMORY. Attempts to change the journal
|
||||||
|
** mode of an in-memory database to something other than _OFF or _MEMORY
|
||||||
|
** are silently ignored.
|
||||||
**
|
**
|
||||||
** The returned indicate the current (possibly updated) journal-mode.
|
** The returned indicate the current (possibly updated) journal-mode.
|
||||||
*/
|
*/
|
||||||
int sqlite3PagerJournalMode(Pager *pPager, int eMode){
|
int sqlite3PagerJournalMode(Pager *pPager, int eMode){
|
||||||
if( !MEMDB ){
|
|
||||||
assert( eMode==PAGER_JOURNALMODE_QUERY
|
assert( eMode==PAGER_JOURNALMODE_QUERY
|
||||||
|| eMode==PAGER_JOURNALMODE_DELETE
|
|| eMode==PAGER_JOURNALMODE_DELETE
|
||||||
|| eMode==PAGER_JOURNALMODE_TRUNCATE
|
|| eMode==PAGER_JOURNALMODE_TRUNCATE
|
||||||
@ -5199,17 +5201,18 @@ int sqlite3PagerJournalMode(Pager *pPager, int eMode){
|
|||||||
|| eMode==PAGER_JOURNALMODE_OFF
|
|| eMode==PAGER_JOURNALMODE_OFF
|
||||||
|| eMode==PAGER_JOURNALMODE_MEMORY );
|
|| eMode==PAGER_JOURNALMODE_MEMORY );
|
||||||
assert( PAGER_JOURNALMODE_QUERY<0 );
|
assert( PAGER_JOURNALMODE_QUERY<0 );
|
||||||
if( eMode>=0 ){
|
if( eMode>=0 && (!MEMDB || eMode==PAGER_JOURNALMODE_MEMORY
|
||||||
|
|| eMode==PAGER_JOURNALMODE_OFF) ){
|
||||||
pPager->journalMode = (u8)eMode;
|
pPager->journalMode = (u8)eMode;
|
||||||
}else{
|
|
||||||
assert( eMode==PAGER_JOURNALMODE_QUERY );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return (int)pPager->journalMode;
|
return (int)pPager->journalMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get/set the size-limit used for persistent journal files.
|
** Get/set the size-limit used for persistent journal files.
|
||||||
|
**
|
||||||
|
** Setting the size limit to -1 means no limit is enforced.
|
||||||
|
** An attempt to set a limit smaller than -1 is a no-op.
|
||||||
*/
|
*/
|
||||||
i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
|
i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
|
||||||
if( iLimit>=-1 ){
|
if( iLimit>=-1 ){
|
||||||
|
Loading…
Reference in New Issue
Block a user