Fixed bug when using DRCP with a 23c Oracle Database.

This commit is contained in:
Anthony Tuininga 2023-06-15 15:30:37 -06:00
parent d480381035
commit eeda0162d1
3 changed files with 30 additions and 10 deletions

View File

@ -25,6 +25,7 @@ Thin Mode Changes
#) Fixed bug which could cause a redirect loop with improperly configured
listener redirects.
#) Fixed bug when executing PL/SQL with a large number of binds.
#) Fixed bug when using DRCP with a 23c Oracle Database.
Thick Mode Changes
++++++++++++++++++

View File

@ -2238,3 +2238,26 @@ cdef class RollbackMessage(Message):
Perform initialization.
"""
self.function_code = TNS_FUNC_ROLLBACK
@cython.final
cdef class SessionReleaseMessage(Message):
cdef:
uint32_t release_mode
cdef int _initialize_hook(self) except -1:
"""
Perform initialization.
"""
self.message_type = TNS_MSG_TYPE_ONEWAY_FN
self.function_code = TNS_FUNC_SESSION_RELEASE
cdef int _write_message(self, WriteBuffer buf) except -1:
"""
Write the message for a DRCP session release.
"""
self._write_function_code(buf)
buf.write_uint8(0) # pointer (tag name)
buf.write_uint8(0) # tag name length
buf.write_ub4(self.release_mode) # mode

View File

@ -102,7 +102,7 @@ cdef class Protocol:
message = conn_impl._create_message(RollbackMessage)
self._process_message(message)
if conn_impl._drcp_enabled:
self._release_drcp_session(self._write_buf, release_mode)
self._release_drcp_session(conn_impl, release_mode)
conn_impl._drcp_establish_session = True
# if the connection is part of a pool, return it to the pool
@ -397,20 +397,16 @@ cdef class Protocol:
buf.skip_raw_bytes(3)
message.error_info.message = buf.read_str(TNS_CS_IMPLICIT)
cdef int _release_drcp_session(self, WriteBuffer buf,
cdef int _release_drcp_session(self, ThinConnImpl conn_impl,
uint32_t release_mode) except -1:
"""
Release the session back to DRCP. Standalone sessions are marked for
deauthentication.
"""
buf.start_request(TNS_PACKET_TYPE_DATA)
buf.write_uint8(TNS_MSG_TYPE_ONEWAY_FN)
buf.write_uint8(TNS_FUNC_SESSION_RELEASE)
buf.write_uint8(0) # seq number
buf.write_uint8(0) # pointer (tag name)
buf.write_uint8(0) # tag name length
buf.write_ub4(release_mode) # mode
buf.end_request()
cdef SessionReleaseMessage message
message = conn_impl._create_message(SessionReleaseMessage)
message.release_mode = release_mode
message.send(self._write_buf)
cdef int _reset(self, Message message) except -1:
cdef uint8_t marker_type