[Interest] Qt 5.1.1 SQLite blocks database
mabrand at mabrand.nl
Wed Oct 30 13:04:04 CET 2013
> Now I am porting to Qt 5.1.1 and also using the bundeled SQLite (Version
> 3.7.17). The program runs without flaws, but as I start a second client it
> can not make any changes to the database getting the error “database is
> locked Unable to fetch row". It seems to me, that the first program using
> the database sets a database-wide lock until it is closed. So the first
> program opening the database has full access. Any program opening the
> database to a later point of time has only read-permissins.
> I tried to set the locking-mode PRAGMA to Normal (I know it should be at
> normal anyway).
> The problem remains when I use multiple clients on the same machine, using a
> local database-file (so it has nothing to do with network-filesystems
> locking features).
> I have started a thead on the
> forum<https://qt-project.org/forums/viewthread/34130/#148660> and there I
> got the advice to send an email to this list.
> Asking in the sqlite-mailinglist I got this reply:
> > Sounds like something changed in Qt 5.1.1 so that it is holding open a
> > read
> > transaction. The first process acquires the read transaction, which
> > permits other processes to read but prevents anybody else from
> > writing. I
> > have no idea why Qt would do this, though.
> > […]
> > I think your goal should be to figure out why Qt 5.1.1 is holding open
> > the
> > read transaction.
> So could you help with this issue? Was there any change in the way Qt
> handels SQLite-Databases? Could I somehow avoid this?
Could you please make a bug report for this and include a demo that's as
simple as possible? Do you only need 2 different connections to the sqlite
database to see the problem, or do you really need 2 processes to see the
More information about the Interest