On 02/08/2011 06:00 PM, Dennis Geldhof wrote: > Hi all, > > > > I experienced some strange behavior between different versions of > sqlite. Our application uses the System.Data.Sqlite wrapper > (http://sqlite.phxsoftware.com/) which is on sqlite version 3.6.23.1, > but the tools we use to view the database are on sqlite version 3.7.4. > In the application no signs of database corruption are found, but the > tools cannot open the database (tools; http://osenxpsuite.net/?xp=3 / > http://www.sqliteexpert.com/).
Version 3.7.0 of SQLite introduced a field in the database file header containing the logical size of the database. So that a database file can be arbitrarily extended (AKA preallocated) without corrupting it. Earlier versions of SQLite just used the size of the file as the size of the database. http://www.sqlite.org/releaselog/3_7_0.html The symptoms you are reporting come about if the header field indicates that the database image is *larger* than the file on disk. If this is the case, version 3.7.0 and newer assume that the file is corrupt and report the error you are seeing. Earlier versions never read the header field and never see a problem. Since the integrity check passes, it is likely that the database is fine except that the header field is set incorrectly. We're very interested in how this happened. Do you ever write to the db using the 3.7.4 tools? Or write to it with any other 3.7.X version? Vacuum it? > Attached you will find a database file which is not encrypted, and all > tables are dropped. The corruption is still in there and is used to > generate the output mentioned above. I think the mailing list stripped your attachment. Can you put somewhere we can download it from? Or just mail it to me if you like. Thanks. Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users