1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

When using a temporary file for a statement journal, store the first 64KiB in memory. If the file grows larger than that, flush it to disk and free the memory. Hardcoding to 64KiB is just an experiment to check that the memjournal.c code works.

FossilOrigin-Name: 44b2dc18e200e87cf062cb8f1659727c53fa36e9
This commit is contained in:
dan
2016-02-29 20:18:21 +00:00
parent 5f37ed5121
commit 6e76326d18
4 changed files with 15 additions and 12 deletions

View File

@@ -354,7 +354,7 @@ int sqlite3JournalOpen(
** it using the sqlite3OsOpen() function of the underlying VFS. In this
** case none of the code in this module is executed as a result of calls
** made on the journal file-handle. */
memset(p, 0, sizeof(MemJournal) + pVfs ? pVfs->szOsFile : 0);
memset(p, 0, sizeof(MemJournal) + (pVfs ? pVfs->szOsFile : 0));
if( nBuf==0 ){
return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
}