Quoth Drake Wilson <dr...@dasyatidae.net>, on 2013-06-07 08:14:27 -0500:
> If you really want, you might be able to implement xFetch to allocate a shadow
> buffer, decrypt from the map into that, and return that pointer.  Since it's
> designed for accessing maps directly, though, I don't see it documented what
> the lifetime of that pointer has to be---it might be "until the file is 
> closed",
> in which case you have to keep those shadow buffers alive the entire time, but
> you might still avoid taking syscalls that way.

Actually, I dropped a paragraph on the floor, sorry.  It's probably better to 
use
xRead for this, since in that case SQLite will manage its own memory for the 
cache
of decrypted pages.  The loss in that case, if you still use mmap behind the 
scenes,
is that you don't respect PRAGMA mmap_size anymore since the rest of SQLite will
think you're using "normal" I/O, and so it becomes impossible for other code to
turn mmap off to avoid I/O-error-based execution faults or such.

   ---> Drake Wilson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to