John - what were you doing when you discovered this?

On May 26, 2009, at 10:57 AM, John Machin wrote:

> According to the file format document
> (http://www.sqlite.org/fileformat.html): "[H30120] The 4 byte block
> starting at byte offset 44 of a well-formed database file, the schema
> layer file format, contains a big-endian integer value between 1 and  
> 4,
> inclusive."
>
> However it is possible to end up with this being zero, e.g. by  
> dropping
> all tables/etc and then doing a VACUUM:
>
> # Assume vacked.db doesn't exist
> DOS-prompt>sqlite3 vacked.db
> SQLite version 3.6.14
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table foo (x, y);
> sqlite> insert into foo values(1, 2);
> sqlite> drop table foo;
> sqlite> vacuum;
> sqlite> ^Z
>
> This seems very much a corner case and I don't imagine this is a  
> problem
> in practice; any concern about this number being when it is too high  
> for
> the software opening the file, and as far as I can guess there is no
> "too low" problem -- however in my opinion differences between such
> documents and reality should always be reported, so here it is.

D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to