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

If a.db differs from b.db in that condition, then narrowing the test case down 
by hand-editing dump.sql would be the way to find out why the difference is 
occurring.

If no difference occurs in this case, then it sounds like your current method 
to create the DBs isn?t identical, Aaron.

Another way to attack it would be:

    sqlite3 my-a.db .dump > a-dump.sql
    sqlite3 my-b.db .dump > b-dump.sql
    diff -u ?-dump.sql

If that results in differences, it will probably clue you into why the 
difference is occurring.

If there is no difference in the dump outputs, then there is a structural-only 
change to the sqlite DB files, which suggests that the difference might be 
purely structural.  Perhaps a VACUUM would fix it.  Or, just dump and re-load, 
as above.

Reply via email to