Stephen Chrzanowski wrote:
> [...] I'm relying on the results from "pragma
> schema_version".  I've noticed that this bumps up every time I run a vacuum
> or use the backup API against the database.  Is this supposed to happen?

The documentation says that the schema version
| is incremented by SQLite whenever the database schema is modified (by
| creating or dropping a table or index). The schema version is used by
| SQLite each time a query is executed to ensure that the internal cache
| of the schema used when compiling the SQL query matches the schema of
| the database against which the compiled query is actually executed.

Inside a compiled statement, tables and indexes are identified by their
root page number.  When running VACUUM, this is likely to change.

The backup code has this comment:
    /* Update the schema version field in the destination database. This
    ** is to make sure that the schema-version really does change in
    ** the case where the source and destination databases have the
    ** same schema version.
    */


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

Reply via email to