Do you feel that the platform - Hardware / OS / some other factor could influence the way SQLite performed its sequence?

Instead of trying to compare the hashes of DB files themselves, you appear to want a strict comparison of sets in the contents of the DBs.

For instance, changing the schema of the DBs in different ways will make schema_version differ, just as many internal values (none of which preclude the actual (user-visible and meaningful) content to be exactly the same.

What would be a more robust way to compare DBs X and Y is to perform a
(select * from X.T except select * from Y.T) union (select * from Y.T except select * from X.T)
for each and every user table T in the resultset of
select name from sqlite_master where type like 'table'

(Note that I don't know off-hand what the exact distinction is between column name and tbl_name in this master table).

You get rid of row order, order of schema creation, internal encoding, history of row life (insert, update, delete) and many details that will stop you from comparing row DB files.

That may require some adjustment to work in practice, but the main idea is there: comparing sets and SQL is the right tool to do that.

As a sidenote, understand that the query above will silently ignore duplicates, but it's my understanding that it shouldn't be a problem in your context.

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

Reply via email to