Hi Richard,

After I update to 3.21.0, the situation doesn't change.

$ sqlite3 --version
3.21.0 2017-10-24 18:55:49
1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827

For "some-db.sqlite" I mentioned in the previous mail, it exit with 0, like
you said. However, if I copy "some-db.sqlite" to "other-db.sqlite" and make
some arbitrary changes in "other-db.sqlite" using vim:

$ sqlite3 other-db.sqlite 'PRAGMA integrity_check'
Error: database disk image is malformed
$ echo $?
11

Is that normal?

Best,
John Lin

Richard Hipp <d...@sqlite.org> 於 2017年11月23日 週四 上午9:39寫道:

> On 11/22/17, 林自均 <johnl...@gmail.com> wrote:
> >
> > Usually, if the database corrupts, the exit value is non-zero. However, I
> > recently bumped into a corrupted sqlite file that makes the previous
> > command exit with zero.
> >
>
> The behavior of PRAGMA integrity_check changed with release 3.21.0.
> It should now always return error message text and an SQLITE_OK return
> code.  See item 9 on the relase notes:
> https://www.sqlite.org/releaselog/3_21_0.html
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> 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

Reply via email to