File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ Thin Mode Changes
4646 potentially exceed the 32767 byte limit but the actual value bound does not
4747 (`issue 146 <https://github.com/oracle/python-oracledb/issues/146 >`__).
4848#) Fixed bug connecting to an IPv6 address with IAM tokens.
49+ #) Fixed bug determining RETURNING binds in a SQL statement when RETURNING and
50+ INTO keywords are not separated by whitespace, but are separated by
51+ parentheses.
4952#) Internal implementation changes:
5053
5154 - Added internal support for prefetching the LOB size and chunk size,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ BIND_PATTERN = r'(?<!"\:)(?<=\:)\s*("[^\"]*"|[^\W\d_][\w\$#]*|\d+)'
4343# pattern used for detecting a DML returning clause; bind variables in the
4444# first group are input variables; bind variables in the second group are
4545# output only variables
46- DML_RETURNING_PATTERN = r ' (?si) ( [) \s ]RETURNING\s + [\s\S ]+ \s + INTO\s + ) ( . *? $ ) '
46+ DML_RETURNING_PATTERN = r ' (?si) ( [) \s ]RETURNING[ ( \s ] [\s\S ]+ [ ) \s ] INTO\s + ) ( . *? $ ) '
4747
4848cdef class BindInfo:
4949
Original file line number Diff line number Diff line change @@ -424,5 +424,14 @@ def test_1621_plsql_returning_rowids_with_index_organized_table(self):
424424 row , = self .cursor .fetchall ()
425425 self .assertEqual (data [:3 ], row )
426426
427+ def test_1622_parse_returning_clause_without_spaces (self ):
428+ "1622 - parse DML returning with no spaces"
429+ self .cursor .execute ("truncate table TestTempTable" )
430+ sql = 'insert into TestTempTable (IntCol) values (:in_val)' + \
431+ 'returning(IntCol)into :out_val'
432+ out_val = self .cursor .var (int , arraysize = 5 )
433+ self .cursor .execute (sql , in_val = 25 , out_val = out_val )
434+ self .assertEqual (out_val .getvalue (), [25 ])
435+
427436if __name__ == "__main__" :
428437 test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments