Skip to content

Commit 7f3c938

Browse files
Fixed bug creating a homogeneous connection pool with a proxy user
(#101).
1 parent af750c6 commit 7f3c938

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

doc/src/release_notes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ python-oracledb Release Notes
77

88
For deprecations, see :ref:`Deprecations <deprecations>`.
99

10+
oracledb 1.2.1 (TBD)
11+
--------------------
12+
13+
Thick Mode Changes
14+
++++++++++++++++++
15+
16+
#) Fixed bug creating a homogeneous connection pool with a proxy user
17+
(`issue 101 <https://github.com/oracle/python-oracledb/issues/101>`__).
18+
19+
1020
oracledb 1.2.0 (November 2022)
1121
------------------------------
1222

src/oracledb/impl/thick/pool.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ cdef class ThickPoolImpl(BasePoolImpl):
126126

127127
# prepare user, password and DSN for use
128128
if self.username is not None:
129-
user_bytes = self.username.encode()
129+
user_bytes = params.get_full_user().encode()
130130
user_ptr = user_bytes
131131
user_len = <uint32_t> len(user_bytes)
132132
password_bytes = params._get_password()

src/oracledb/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
# file doc/src/conf.py both reference this file directly.
3131
#------------------------------------------------------------------------------
3232

33-
__version__ = "1.2.0"
33+
__version__ = "1.2.1"

tests/test_2400_pool.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,5 +717,13 @@ def test_2430_get_different_types_from_pooled_connections(self):
717717
typ = conn.gettype("UDT_OBJECTARRAY")
718718
self.assertEqual(typ.name, "UDT_OBJECTARRAY")
719719

720+
def test_2431_proxy_user_in_create(self):
721+
"2431 - test creating a pool using a proxy user"
722+
user_str = "%s[%s]" % \
723+
(test_env.get_main_user(), test_env.get_proxy_user())
724+
pool = test_env.get_pool(user=user_str)
725+
self.__verify_connection(pool.acquire(), test_env.get_proxy_user(),
726+
test_env.get_main_user())
727+
720728
if __name__ == "__main__":
721729
test_env.run_test_cases()

0 commit comments

Comments
 (0)