-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/24/2011 09:27 PM, Dan Kennedy wrote: > Does the aspw xFileControl method modify the value of the output > parameter in this case?
No. > The idea was that existing VFS implementations would return SQLITE_ERROR > since they do not recognize SQLITE_FCNTL_SYNC but not modify the value > of the integer that the parameter points to. Maybe that is too > optimistic an assumption. Strictly speaking you are correct and my code is wrong. Behind the scenes I turn SQLite errors into exceptions. However this particular one as currently implemented always returns an error so I'd have to include a table of when to ignore errors and when not to. The issues I have with this file control are: - - It is documented as "internal" but my code sees it hence it is now part of the external interface of SQLite - - None of the existing SQLite VFS code implement it - - It duplicates the existing xSync method - - It bypasses the normal error return mechanism, which is also not checked Behind the scenes it looks like it is being provided for VFS that are not in sync mode to let them know when a sync would have been done. This is because an individual VFS does not itself know if it is in sync mode. I'd argue that a far better approach is to let a VFS know if it is in sync mode or not rather than hiding that information from it, and always call its xSync method which it can choose to obey or ignore as appropriate. (You could also have an xSync flag that indicates syncing is optional.) Changing things that way is a little more intrusive but is a better long term way of structuring things than the short term expedient way SQLITE_FCNTL_SYNC has been implemented. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0++uIACgkQmOOfHg372QQuigCg1C+TQMI+Zq1ySBkzjMZBZfgq ybgAoMfuf8A7HH/sKMdb7Rx8utAxlhH1 =LvHp -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users