On 20 Nov 2017, at 6:20pm, Jim Dossey <j...@bgs.cc> wrote:

> I think the documentation for "PRAGMA data_version" at 
> https://www.sqlite.org/pragma.html is incorrect.  I've been testing this 
> pragma and I've found that it only returns '1' for a standard database or '2' 
> if the database is in WAL mode.  The documentation makes it sound like this 
> value changes every time a COMMIT is made to the database.

Not quite:

<https://www.sqlite.org/pragma.html#pragma_data_version>

" The "PRAGMA data_version" value is unchanged for commits made on the same 
database connection. The behavior of "PRAGMA data_version" is the same for all 
database connections, including database connections in separate processes and 
shared cache database connections. "

The idea is that the version is not incremented every time a change is made.  
It is incremented one every time a particular connection makes any changes.

To test it out you would need to maintain two connections to the database file 
and alternate which one writes to the database.  You should be able to test 
this using two copies of the SQLite command-line tool running at the same time.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to