Re: [sqlite] bug in sqlite when

2016-08-24 Thread Richard Hipp
On 8/24/16, Sergey Shamshyn  wrote:
> - *PRAGMA journal_mode=OFF* (when not execute this pragma, all is ok).

With journal_mode=OFF, the database may go corrupt if:

(1) The program is ever terminated (ex: using SIGKILL) while the
database is open.
(2) If a COMMIT statement ever fails due to an I/O or out-of-memory error.
(3) Failure of a constraint during an UPDATE (depending on the schema).
(4) Calling sqlite3_close() while a transaction is active.

In other words, without a journal, there are many ways to corrupt the
database file that do not involve power failures or I/O errors.
-- 
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


Re: [sqlite] bug in sqlite when

2016-08-24 Thread Igor Korot
Hi, Sergey,

On Wed, Aug 24, 2016 at 8:55 AM, Sergey Shamshyn
 wrote:
> Hi.
> I have a big trouble using SQLite: got an error SQLITE_CORRUPT (11), I think
> this is a 100% SQLite bug, because:
> - only ONE THREAD of my process is writing periodically to db file
> - onlt ONE ANOTHER THREAD of my another process reads from this db file
> - version 3.14.1
> - PRAGMA synchronous=OFF
> - *PRAGMA journal_mode=OFF* (when not execute this pragma, all is ok).
> Looks like bug in PRAGMA journal_mode=OFF, because *only one thread is
> writing to DB*!
> - No power crashes, or chkdsk errors on this HDD.
> - In attachment example of corrupted DB

This list does not accept attachments.
Can you put the DB somewhere on the file sharing service and put the link here?

Thank you.

>
>
>
> ___
> 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


[sqlite] bug in sqlite when

2016-08-24 Thread Sergey Shamshyn

Hi.
I have a big trouble using SQLite: got an error SQLITE_CORRUPT (11), I 
think this is a 100% SQLite bug, because:

- only ONE THREAD of my process is writing periodically to db file
- onlt ONE ANOTHER THREAD of my another process reads from this db file
- version 3.14.1
- PRAGMA synchronous=OFF
- *PRAGMA journal_mode=OFF* (when not execute this pragma, all is ok).
Looks like bug in PRAGMA journal_mode=OFF, because *only one thread is 
writing to DB*!

- No power crashes, or chkdsk errors on this HDD.
- In attachment example of corrupted DB



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users