File tree 4 files changed +24
-4
lines changed
4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ oracledb 1.2.2 (TBD)
13
13
Thin Mode Changes
14
14
+++++++++++++++++
15
15
16
+ #) Fixed bug when binding OUT a NULL boolean value.
17
+ (`issue 119 <https://github.com/oracle/python-oracledb/issues/119 >`__).
18
+
16
19
Thick Mode Changes
17
20
++++++++++++++++++
18
21
Original file line number Diff line number Diff line change 1
1
# ------------------------------------------------------------------------------
2
- # Copyright (c) 2020, 2022 , Oracle and/or its affiliates.
2
+ # Copyright (c) 2020, 2023 , Oracle and/or its affiliates.
3
3
#
4
4
# This software is dual-licensed to you under the Universal Permissive License
5
5
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -615,7 +615,9 @@ cdef class MessageWithData(Message):
615
615
name = var_impl.dbtype.name)
616
616
if not self .in_fetch:
617
617
buf.read_sb4(& actual_num_bytes)
618
- if actual_num_bytes != 0 and column_value is not None :
618
+ if actual_num_bytes < 0 and column_value is False :
619
+ column_value = None
620
+ elif actual_num_bytes != 0 and column_value is not None :
619
621
unit_type = " bytes" if isinstance (column_value, bytes) \
620
622
else " characters"
621
623
errors._raise_err(errors.ERR_COLUMN_TRUNCATED,
Original file line number Diff line number Diff line change 1
1
/*-----------------------------------------------------------------------------
2
- * Copyright (c) 2020, 2022 , Oracle and/or its affiliates.
2
+ * Copyright (c) 2020, 2023 , Oracle and/or its affiliates.
3
3
*
4
4
* This software is dual-licensed to you under the Universal Permissive License
5
5
* (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -968,6 +968,9 @@ create or replace package &main_user..pkg_TestBooleans as
968
968
a_Value udt_BooleanList
969
969
) return number;
970
970
971
+ function TestOutValueNull
972
+ return boolean;
973
+
971
974
procedure TestOutArrays (
972
975
a_NumElements number,
973
976
a_Value out nocopy udt_BooleanList
@@ -1011,6 +1014,12 @@ create or replace package body &main_user..pkg_TestBooleans as
1011
1014
return t_Result;
1012
1015
end;
1013
1016
1017
+ function TestOutValueNull
1018
+ return boolean is
1019
+ begin
1020
+ return null;
1021
+ end;
1022
+
1014
1023
procedure TestOutArrays (
1015
1024
a_NumElements number,
1016
1025
a_Value out nocopy udt_BooleanList
Original file line number Diff line number Diff line change 1
1
#------------------------------------------------------------------------------
2
- # Copyright (c) 2020, 2022 , Oracle and/or its affiliates.
2
+ # Copyright (c) 2020, 2023 , Oracle and/or its affiliates.
3
3
#
4
4
# This software is dual-licensed to you under the Universal Permissive License
5
5
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -89,5 +89,11 @@ def test_3107_bind_true(self):
89
89
(True ,))
90
90
self .assertEqual (result , "TRUE" )
91
91
92
+ def test_3108_bind_out_null (self ):
93
+ "3108 - test binding out a boolean value (None)"
94
+ result = self .cursor .callfunc ("pkg_TestBooleans.TestOutValueNull" ,
95
+ bool )
96
+ self .assertEqual (result , None )
97
+
92
98
if __name__ == "__main__" :
93
99
test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments