Am Freitag, 25. September 2015 20:46 CEST, Warren Young <wyml at etr-usa.com> schrieb:
> On Sep 25, 2015, at 11:59 AM, Richard Hipp <drh at sqlite.org> wrote: > > > > On 9/25/15, Aaron Digulla <digulla at hepe.com> wrote: > >> > >> I was wondering if it was possible to create the same database (= no binary > >> difference) twice with sqlite. > > > > It works fine to create identical database files when I try it: > > > > drh at bella:~/sqlite/bld$ ./sqlite3 db1 <x7.txt > > drh at bella:~/sqlite/bld$ ./sqlite3 db2 <x7.txt > > That suggests a good test for Aaron, then: > > sqlite3 my.db .dump > dump.sql > sqlite3 a.db < dump.sql > sqlite3 b.db < dump.sql Thank you very much. This set of commands has allowed me to narrow down the root cause to the Java JDBC driver by xerial (https://github.com/xerial/sqlite-jdbc): When I dump the database and recreate it two times with the command line sqlite3 tool, I get the exact same files. Looking at the source code of the JDBC driver, I can't see anything obviously wrong, either. There is one malloc() where it doesn't clear the memory but I'm not creating functions, so the code is never used. The other malloc() when I read metadata from the database. That leaves me with a bug in my code or some really odd behavior because of the Java VM. Regards, -- Aaron "Optimizer" Digulla a.k.a. Philmann Dark "It's not the universe that's limited, it's our imagination. Follow me and I'll show you something beyond the limits." http://blog.pdark.de/