[mssql] Fix connection corruption after executing sq (ltr backport)#61152
Merged
nyalldawson merged 10 commits intoqgis:queued_ltr_backportsfrom Mar 25, 2025
Merged
[mssql] Fix connection corruption after executing sq (ltr backport)#61152nyalldawson merged 10 commits intoqgis:queued_ltr_backportsfrom
nyalldawson merged 10 commits intoqgis:queued_ltr_backportsfrom
Conversation
Executing any SQL on a SQL Server connection would result in the connection being dropped while it was still in use, leaving the provider in a interdeterminate state which would often refuse to run futher queries. The QSqlQuery class does NOT have a virtual destructor, so we need to explicitly use the QgsMssqlQuery class for the results iterator so that the QgsMssqlQuery destructor gets called and the shared reference to the QgsMssqlDatabase instance gets released correctly. (cherry picked from commit 7457b1d) (cherry picked from commit 117fff3)
Contributor
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
alexbruy
approved these changes
Mar 25, 2025
4497803
into
qgis:queued_ltr_backports
30 of 31 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual backport of #61060