Skip to content

Commit c3c2573

Browse files
Fixed bug when setting "SOURCE_ROUTE" on the "DESCRIPTION" section of a
full connect descriptor instead of the "ADDRESS_LIST" section.
1 parent 3df1328 commit c3c2573

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

doc/src/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Thin Mode Changes
2020
+++++++++++++++++
2121

2222
#) Fixed bug when using bind variables with scrollable cursors.
23+
#) Fixed bug when setting ``SOURCE_ROUTE`` on the ``DESCRIPTION`` section of a
24+
full connect descriptor instead of the ``ADDRESS_LIST`` section.
2325

2426
Thick Mode Changes
2527
++++++++++++++++++

src/oracledb/impl/base/parsers.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ cdef class ConnectStringParser(BaseParser):
362362
description.set_from_security_args(sub_args)
363363
address_lists = desc_args.get("address_list", desc_args)
364364
if not isinstance(address_lists, list):
365+
description.source_route = False
365366
address_lists = [address_lists]
366367
for list_args in address_lists:
367368
address_list = AddressList()

tests/test_4500_connect_params.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,7 @@ def test_4531():
588588
params.parse_connect_string(connect_string)
589589
source_route_clause = "(SOURCE_ROUTE=ON)" if has_section else ""
590590
connect_string = (
591-
f"(DESCRIPTION={source_route_clause}"
592-
f"(ADDRESS_LIST={source_route_clause}"
591+
f"(DESCRIPTION=(ADDRESS_LIST={source_route_clause}"
593592
"(ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1521))"
594593
"(ADDRESS=(PROTOCOL=tcp)(HOST=host2)(PORT=1522)))"
595594
"(CONNECT_DATA=(SERVICE_NAME=my_service_35)))"

0 commit comments

Comments
 (0)