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