Skip to content

Commit f3984ce

Browse files
The connection created by using an external handle should never be used after
the external handle has been closed or destroyed (since otherwise the memory used may have already been freed and reused by other parts of the application).
1 parent 3a23957 commit f3984ce

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

doc/src/api_manual/module.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ Module Interface
6868

6969
If the handle is specified, it must be of type OCISvcCtx\* and is only of
7070
use when embedding Python in an application (like PowerBuilder) which has
71-
already made the connection.
71+
already made the connection. The connection thus created should *never* be
72+
used after the source handle has been closed or destroyed.
7273

7374
The pool parameter is expected to be a
7475
:ref:`session pool object <sesspool>` and the use of this parameter is the

test/test_1100_connection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ def test_1113_connect_with_handle(self):
228228
cursor.close()
229229
self.assertRaises(oracledb.DatabaseError, connection2.close)
230230
connection.close()
231-
cursor = connection2.cursor()
232-
self.assertRaises(oracledb.DatabaseError, cursor.execute,
233-
"select count(*) from TestTempTable")
234231

235232
def test_1114_make_dsn(self):
236233
"1114 - test making a data source name from host, port and sid"

0 commit comments

Comments
 (0)