mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 14:09:13 +00:00
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
# Allow the VFS to force memory journal mode
|
|
# regardless of SQLITE_OMIT_DESERIALIZE.
|
|
--- sqlite3.c.orig
|
|
+++ sqlite3.c
|
|
@@ -60425,11 +60425,7 @@
|
|
int rc = SQLITE_OK; /* Return code */
|
|
int tempFile = 0; /* True for temp files (incl. in-memory files) */
|
|
int memDb = 0; /* True if this is an in-memory file */
|
|
-#ifndef SQLITE_OMIT_DESERIALIZE
|
|
int memJM = 0; /* Memory journal mode */
|
|
-#else
|
|
-# define memJM 0
|
|
-#endif
|
|
int readOnly = 0; /* True if this is a read-only file */
|
|
int journalFileSize; /* Bytes to allocate for each journal fd */
|
|
char *zPathname = 0; /* Full path to database file */
|
|
@@ -60628,9 +60624,7 @@
|
|
int fout = 0; /* VFS flags returned by xOpen() */
|
|
rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout);
|
|
assert( !memDb );
|
|
-#ifndef SQLITE_OMIT_DESERIALIZE
|
|
pPager->memVfs = memJM = (fout&SQLITE_OPEN_MEMORY)!=0;
|
|
-#endif
|
|
readOnly = (fout&SQLITE_OPEN_READONLY)!=0;
|
|
|
|
/* If the file was successfully opened for read/write access,
|