File tree 4 files changed +15
-1
lines changed
4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ oracledb 2.1.2 (TBD)
13
13
Thin Mode Changes
14
14
+++++++++++++++++
15
15
16
+ #) Fixed bug that prevented error ``ORA-01403: no data found `` from being
17
+ raised when executing a PL/SQL block
18
+ (`issue 321 <https://github.com/oracle/python-oracledb/issues/321 >`__).
19
+
16
20
Thick Mode Changes
17
21
++++++++++++++++++
18
22
Original file line number Diff line number Diff line change @@ -774,7 +774,7 @@ cdef class MessageWithData(Message):
774
774
cursor_impl._batcherrors = self .error_info.batcherrors
775
775
if self .batcherrors and cursor_impl._batcherrors is None :
776
776
cursor_impl._batcherrors = []
777
- if self .error_info.num == TNS_ERR_NO_DATA_FOUND:
777
+ if self .error_info.num == TNS_ERR_NO_DATA_FOUND and self .in_fetch :
778
778
self .error_info.num = 0
779
779
cursor_impl._more_rows_to_fetch = False
780
780
cursor_impl._last_row_index = 0
Original file line number Diff line number Diff line change @@ -554,6 +554,11 @@ def test_3934(self):
554
554
self .cursor .execute ("begin null; end;" )
555
555
self .assertEqual (self .cursor .rowcount , 0 )
556
556
557
+ def test_3935 (self ):
558
+ "3935 - test raising no_data_found in PL/SQL"
559
+ with self .assertRaisesFullCode ("ORA-01403" ):
560
+ self .cursor .execute ("begin raise no_data_found; end;" )
561
+
557
562
558
563
if __name__ == "__main__" :
559
564
test_env .run_test_cases ()
Original file line number Diff line number Diff line change @@ -591,6 +591,11 @@ async def test_5435(self):
591
591
row = await self .cursor .fetchone ()
592
592
self .assertEqual (row , tuple (values ))
593
593
594
+ async def test_5436 (self ):
595
+ "5436 - test raising no_data_found in PL/SQL"
596
+ with self .assertRaisesFullCode ("ORA-01403" ):
597
+ await self .cursor .execute ("begin raise no_data_found; end;" )
598
+
594
599
595
600
if __name__ == "__main__" :
596
601
test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments