session.c:session_free:if session is child of another service (tee in this case), it is the parent which releases child's allocated memory back to the system. This now also includes the child router session. dcb.h: Added DCB_IS_CLONE macro tee.c:freeSession:if parent session triggered closing of tee, then child session may not be closed yet. In that case free the child session first and only then free child router session and release child session's memory back to system. tee.c:routeQuery: only route if child session is ready for routing. Log if session is not ready for routing and set tee session inactive mysql_client.c:gw_client_close:if DCB is cloned one don't close the protocol because they it is shared with the original DCB.
This commit is contained in:
@ -1401,9 +1401,14 @@ gw_client_close(DCB *dcb)
|
||||
LOGIF(LD, (skygw_log_write(LOGFILE_DEBUG,
|
||||
"%lu [gw_client_close]",
|
||||
pthread_self())));
|
||||
|
||||
mysql_protocol_done(dcb);
|
||||
|
||||
/**
|
||||
* Since only protocol pointer is copied from original DCB to clone in
|
||||
* dcb_clone, only dcb_close for the original DCB closes protocol.
|
||||
*/
|
||||
if (!DCB_IS_CLONE(dcb))
|
||||
{
|
||||
mysql_protocol_done(dcb);
|
||||
}
|
||||
session = dcb->session;
|
||||
/**
|
||||
* session may be NULL if session_alloc failed.
|
||||
|
Reference in New Issue
Block a user