2010/8/31 Richard Hipp <d...@sqlite.org>

> os_unix.c is very unlikely to change in ways that you care about.


I think the biggest concern is just copying that code, please see
http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/7f8e9bf0f034322f/b26e422d4aa711c7.
I think that keeping it in sync is a relatively minor concern, given
that
we update SQLite so rarely.


> The VFS is a well-defined and supported interface for SQLite.  We maintain
> backwards compatibility.  So even if you had been using an older custom VFS
> built using an older 3.6.23-or-earlier os_unix.c, it will still continue
> working on newer versions of SQLite - you just wouldn't be able to take
> advantage of the enhanced write-ahead log feature.
>

I wonder whether it would be possible to extend the VFS in a way that would
make our use case possible (transferring a file handle over process
boundary). Please note that we do it on all platforms. On POSIX we pass an
integer file descriptor, and on Windows we pass a HANDLE.

Additionally, browsers seem to be moving to the multi-process architecture
(Chrome, Firefox, WebKit2), so I wouldn't be surprised if you get more
questions about this in the future, or just more forked copies.

What do you think about extending the SQLite VFS to make it possible to open
a database having a file handle (fd on Unix, HANDLE on Windows)? Opening
based on file path would still be there (to preserve compatibility).


> The only thing that might trip you up is a bug fix in os_unix.c.  Those are
> very, very uncommon.  In fact, I can't call to mind the last time we had
> any
> serious bug in os_unix.c.


My biggest concern in this thread is a nice design. We have to bundle SQLite
in Chromium repository anyway because non-Linux platforms usually don't
provide SQLite, or have an older version, etc. Updating a custom-patched
os_unix.c (our current situation) is equally difficult to updating a copied
and patched os_unix.c, in case we have to apply a bugfix.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to