On Tuesday, 3 May 2016, Richard Hipp <drh at sqlite.org <javascript:_e(%7B%7D,'cvml','drh at sqlite.org');>> wrote:
> On 5/2/16, Mikael <mikael.trash at gmail.com> wrote: > > > > If I just force it on (by hacking the build script), as long as mmap_size > > always is 2^63, will Sqlite access the file via memory accesses only, and > > never using fread/fwrite which would lead to undefined behavior because > of > > the absence of a UBC? > > > > SQLite only reads using mmap. Write always happen using the write() > (or pwrite()) system call. So it will never work on OpenBSD. > > The database file is mmap-ed read-only. This is so that stray > pointers in the application cannot trivially corrupt the database > file. Aha. What do you say about the idea of a memory access only mode, enabled with SQLITE_MMAP_NO_FILEIO on any OS, for the daring users who want that? Mikael

