>An empty file and a file filled with zeros are two different things The file is empty/has size 0 in the file system.
So the filesystem interface indeed returns SQLITE_IOERR_SHORT_READ. But the page1 pointer (this is not in the file, but in the structures managed by sqlite) points to a buffer in memory with all 0's (probably cos it is malloced somewhere and it does not get filled with contents of the file). Regards, Bram ________________________________________ From: sqlite-users [sqlite-users-boun...@mailinglists.sqlite.org] on behalf of Clemens Ladisch [clem...@ladisch.de] Sent: Saturday, July 28, 2018 15:07 To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] sqlite on freertos/fatfs : SQLITE_NOTADB during create table Bram Peeters wrote: > He reads a page from the file in sqlite3PagerSharedLock, but the file is > still 0 so the page is all zeros. An empty file and a file filled with zeros are two different things. Does the file system return SQLITE_IOERR_SHORT_READ? Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users