Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #52736 from troopa81/fix_transaction_create_oracle
[Oracle] Fix transaction creation
  • Loading branch information
troopa81 committed Apr 18, 2023
2 parents bc114fb + 49e920b commit 121f46a
Show file tree
Hide file tree
Showing 2 changed files with 11 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
10 changes: 10 additions & 0 deletions tests/src/python/test_provider_oracle.py
Expand Up @@ -733,6 +733,16 @@ def testNestedInsert(self):
f['pk'] = NULL
self.vl.addFeature(f) # Should not deadlock during an active iteration
f = next(it)
self.vl.rollBack()

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):
"""
Expand Down

0 comments on commit 121f46a

Please sign in to comment.