Hello, On 2016-04-14 15:40, Richard Hipp wrote: > On 4/14/16, Dobrean, Adrian <adrian.dobrean at emc.com> wrote: >> >> The problem is that when I close there are still I/O operations that >> sometimes need to happen, e.g. flush of some buffers, and I need to know if >> those operations finished successfully or not.
> This shouldn't ever come up. xSync should have been called to flush > all I/O operations prior to xClose. ``xSync'' is not called when ``PRAGMA synchronous = OFF''. You should consider monitoring a state of ``synchronous'' by using ``SQLITE_FCNTL_PRAGMA'' > The xClose method is just releasing resources. Kind of like free() in > the standard library. Why doesn't standard-library free() return an > error code? These being said you should flush all buffers by ``xSync'', or disable all buffering and immediately pass all data down after ``PRAGMA synchronous = OFF'' (http://sqlite.org/pragma.html#pragma_synchronous). That is a designed behavior of a VFS driver. If you didn't comply with that schema, you would play on your own with SQLite's sources. -- best regards Cezary H. Noweta