Actions:
|
2013-06-27 14:14 AEST by Arthur Barrett - in SQLite (v3) you can 'open' a DB file even if it is 'invalid', eg: a text file with '.' in it.
If sqlite provide some sort of 'is this a valid sqlite db' API then I can't find it:
http://www.sqlite.org/c3ref/open.html
I DO NOT think that reading the DB and trying to test based on the info on the file format is a good idea,
but it's the only alternative I can think of... At a minimum we could 'detect' some errors if the file is >0
bytes but less than 100 bytes...
http://www.sqlite.org/fileformat2.html
Even though I think this is a BAD IDEA, this bug is to track the issue. Maybe a future release of sqlite will
include an API call to 'test' the file for validity. |