reasons for SQLITE_IOERR_FSTAT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

reasons for SQLITE_IOERR_FSTAT

Tal Tabakman-2
Hi all,
a user of mine (run under Linux) encountered SQLITE_IOERR_FSTAT error while
trying to use our application.
what could be the reasons for such an error ?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: reasons for SQLITE_IOERR_FSTAT

Simon Slavin-3

On 22 Jan 2013, at 3:30pm, Tal Tabakman <[hidden email]> wrote:

> a user of mine (run under Linux) encountered SQLITE_IOERR_FSTAT error while
> trying to use our application.
> what could be the reasons for such an error ?

That result code is meant to be triggered by the following situation:

A database file is opened creating a database handle, then the file is deleted (the unix 'unlink()' call), then another SQLite operation is preformed on the handle which already exists.

With a text file this sort of thing doesn't matter: the changes will be performed, then the file will be closed and it will disappear along with its changes.  But SQLite's use of more than one file for a database (there are journal files too) make deletion a problem, so an error should be generated.

There are some other situations which may trigger this result, mostly to do with using weird characters in the pathname of the file or doing something else that may make lookup of the file fail.  This error may also be triggered if a journal file (rather than the main database file) is deleted while a connection is open.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users