Skip to content

Commit

Permalink
[Oracle] Fixes #52678 transaction creation
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and github-actions[bot] committed Apr 18, 2023
1 parent 4f6f3c9 commit 9df8e0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleconn.cpp
Expand Up @@ -528,7 +528,7 @@ bool QgsOracleConn::execLogged( const QString &query, bool logError, QString *er

QSqlQuery qry( mDatabase );

const bool res { !exec( qry, query, QVariantList() ) };
const bool res { exec( qry, query, QVariantList() ) };

logWrapper.setQuery( qry.lastQuery() );

Expand Down
9 changes: 9 additions & 0 deletions tests/src/python/test_provider_oracle.py
Expand Up @@ -734,6 +734,15 @@ def testNestedInsert(self):
self.vl.addFeature(f) # Should not deadlock during an active iteration
f = next(it)

def testTransactionEditing(self):
tg = QgsTransactionGroup()
tg.addLayer(self.vl)
self.vl.startEditing()
feat = QgsFeature(self.vl.fields())
feat.setAttribute("pk", 6)
self.assertTrue(self.vl.addFeature(feat))
self.vl.rollBack()

def testTimeout(self):
"""
Asserts that we will not deadlock if more iterators are opened in parallel than
Expand Down

0 comments on commit 9df8e0a

Please sign in to comment.