Skip to content

Commit 5b15607

Browse files
Fixed bug in Connection.tpc_recover() where the returned items were not
of the type returned by Connection.xid() as documented.
1 parent f01b07a commit 5b15607

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

doc/src/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Common Changes
7070
#) If both the ``sid`` and ``service_name`` parameters are specified to
7171
:meth:`oracledb.makedsn()`, now only the ``service_name`` parameter is
7272
used and the ``sid`` parameter is ignored.
73+
#) Fixed bug in :meth:`Connection.tpc_recover()` where the returned items were
74+
not of the type returned by :meth:`Connection.xid()` as documented.
7375
#) Internal changes to ensure that no circular imports occur.
7476

7577

src/oracledb/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,6 @@ def tpc_recover(self) -> list:
11001100
DBA_PENDING_TRANSACTIONS.
11011101
"""
11021102
with self.cursor() as cursor:
1103-
cursor.rowfactory = Xid
11041103
cursor.execute(
11051104
"""
11061105
select
@@ -1109,6 +1108,7 @@ def tpc_recover(self) -> list:
11091108
branchid
11101109
from dba_pending_transactions"""
11111110
)
1111+
cursor.rowfactory = Xid
11121112
return cursor.fetchall()
11131113

11141114
def tpc_rollback(self, xid: Xid = None) -> None:

utils/templates/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ def tpc_recover(self) -> list:
10981098
DBA_PENDING_TRANSACTIONS.
10991099
"""
11001100
with self.cursor() as cursor:
1101-
cursor.rowfactory = Xid
11021101
cursor.execute(
11031102
"""
11041103
select
@@ -1107,6 +1106,7 @@ def tpc_recover(self) -> list:
11071106
branchid
11081107
from dba_pending_transactions"""
11091108
)
1109+
cursor.rowfactory = Xid
11101110
return cursor.fetchall()
11111111

11121112
def tpc_rollback(self, xid: Xid = None) -> None:

0 commit comments

Comments
 (0)