However....the DB file is portable across big/little endian and 32/64 bit. So do your hash on the DB file and distribute that. Any reason you can't do that?
http://www.sqlite.org/onefile.html I guess SQLite uses the endianess of the database file over the architecture? Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: [email protected] [[email protected]] on behalf of Jay A. Kreibich [[email protected]] Sent: Wednesday, April 04, 2012 7:26 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Hashing 2 SQLite db files with the same data On Wed, Apr 04, 2012 at 11:15:10AM +1000, Webdude scratched on the wall: > But the same SQLite version, using the same schema, setup with the > same PRAGMA's, creating a db with the same data and in the same > order, and despite hardware / HDD / OS, should still produce the > same file byte-for byte ? No. (And you thought this was going to be easy, didn't you?) By default, the database file uses the same endian as the platform used to create the database file. On platforms where the endian is different from the file, there is an automatic conversion. This means the *information* in the database can be the exact same, but the *file* can still be different. IIRC, the endian only applies to UTF-16 encoded strings, however. And yes... there is a PRAGMA to set this ("encoding"). So, if "setup with the same PRAGMAs" is absolutely true across dozens of PRAGMAs, the files should be the same. If you want to do this, however, you're going to need to set a whole boat-load of PRAGMAs on both platforms, and make sure you get them just right... and re-examine the list every time you upgrade SQLite. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

