Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.8.2
-
None
-
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.26100 N/A Build 26100
Description
When working with SQLite, it is possible to attach (ATTACH command) another database within the current connection to transfer data between databases. After using this attachment, you need to detach (DETACH command). So, when executing this DETACH command within QSqlDatabase::transaction(), I get an error in QSqlQuery:
QSqlError("1", "Unable to fetch row", "database other is locked")
If you execute the DETACH command outside the pair of calls to QSqlDatabase::transaction() and QSqlDatabase::commit(), then there is no error.
Is this normal behavior? If so, should I also move the execution of the ATTACH command outside the pair of calls to QSqlDatabase::transaction() and QSqlDatabase::commit()?
I am attaching a simple project to reproduce this behavior.