Is xSync guaranteed to be called only once, same as for xClose, if it is then 
from flush I/O point of view we should be almost no difference.

However still xClose releases some resources we would need to know when they 
fail.
Is there a "SQLite" (other than having for example a static variable) way to 
propagate any error through any other means than modifying SQLite code, e.g. 
similar to errno, sqlite3_errcode?

With best regards,

Adrian Dobrean
905-315-4953


-----Original Message-----
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp
Sent: Thursday, April 14, 2016 9:41 AM
To: SQLite mailing list
Subject: Re: [sqlite] sqlite3_close does not propagate the error from 
sqlite3_io_methods.xClose

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.  And the return code from xSync is definitely 
propagated back up to the application, as that is important.

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?
--
D. Richard Hipp
drh at sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to