On Wed, 6 Jul 2016 18:10:34 +0200 Chris Brody <chris.br...@gmail.com> wrote:
> > > > Just for my information, what is the purpose of this temporary > > file? I see > >> that -journal file is always stored to disk. > >> > > > > It's a statement journal: > > > > https://www.sqlite.org/tempfiles.html#stmtjrnl > > > > Recent changes mean that the first 64KiB of a statement journal are > > always stored in main-memory, and the temp file only created after > > the file grows larger than 64KiB. Which is probably why you did not > > see the problem immediately. > > > Personally I wish SQLite would fail upon open or perhaps on first > write if it cannot write the temporary file. I think this would make > it easier for programmers to detect and deal with this kind of issue. > Maybe make it an explicit compile-time option to wait until the > temporary file is larger than 64KiB before opening the temp file. > Just a thought. This is set up in src/global.c line 172 on 3.13.0 version 171 #ifndef SQLITE_STMTJRNL_SPILL 172 # define SQLITE_STMTJRNL_SPILL (64*1024) 173 #endif You can predefine it (define before include sqlite3.h) with the value in bytes you want, or set it to -1 to always store them in memory. --- --- Eduardo Morras <emorr...@yahoo.es> _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users