bug in sqlite when

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in sqlite when

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
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: bug in sqlite when

Igor Korot
Hi, Sergey,

On Wed, Aug 24, 2016 at 8:55 AM, Sergey Shamshyn
<[hidden email]> 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
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: bug in sqlite when

Richard Hipp-3
In reply to this post by Sergey Shamshyn
On 8/24/16, Sergey Shamshyn <[hidden email]> 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
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: bug in sqlite when

LincolnBurrows
This post has NOT been accepted by the mailing list yet.
In reply to this post by Sergey Shamshyn
If you got an error SQLITE_CORRUPT (11). It’s mean your database corrupted. You have two option
to solve this error firstly re-install the SQLite database on the system,  if your problem not solved after performing manual method then you can also use a third party tool like SQLite Database recovery to fix the corrupt database.