Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.11.1
-
None
-
49efea26a5fae8c2275999c36c7c8d24cf4125de
Description
When an error happens while opening/closing a database, the QSqlError::nativeErrorCode() is always -1 because the return values from sqlite3_open_v2() and sqlite3_close() aren't passed to qMakeError() in qsql_sqlite.cpp.
Additionally, the error string is read after d->access was already set to 0, so the error string returned from sqlite is always "out of memory" no matter what the error actually was.
Looks like this has been that way since Qt 4.5 already (where git history ends), but I don't see a reason why it should be. I can follow up with a patch, but I just realized it's already 2am here
Attachments
For Gerrit Dashboard: QTBUG-70506 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
239639,7 | sqlite: Fix QSqlError handling when opening/closing database | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |