Prevent attempts from binding the cursor being executed to itself.
This commit is contained in:
parent
ef1fc44f32
commit
2e240bc154
2
odpi
2
odpi
|
@ -1 +1 @@
|
|||
Subproject commit 5e102e0ff1f5d8be9581fb82d29f61e013069918
|
||||
Subproject commit 07b43d059ab2502ebc5c98c26ddecfe63cb0861d
|
|
@ -37,6 +37,17 @@ class TestCursorVar(BaseTestCase):
|
|||
self.assertEqual(cursor.fetchall(),
|
||||
[ (1, 'String 1'), (2, 'String 2') ])
|
||||
|
||||
def testBindSelf(self):
|
||||
"test that binding the cursor itself is not supported"
|
||||
cursor = self.connection.cursor()
|
||||
sql = """
|
||||
begin
|
||||
open :pcursor for
|
||||
select 1 from dual;
|
||||
end;"""
|
||||
self.assertRaises(cx_Oracle.DatabaseError, cursor.execute, sql,
|
||||
pcursor = cursor)
|
||||
|
||||
def testFetchCursor(self):
|
||||
"test fetching a cursor"
|
||||
self.cursor.execute("""
|
||||
|
|
Loading…
Reference in New Issue