dcb.b:dcb_final_free:replaced ((dcb->flags & DCBF_CLONE)==0) with macro !DCB_IS_CLONE(dcb)
readwritesplit.h:Removed invalid macros which assumed that ROUTER_CLIENT_SES->rses_backend_ref always pointed to valid and used backend reference and thus included potential risk of NULL-pointer refernce. mysql_backend.c and mysql_client.c:avoid executing CHK_PROTOCOL(p) after original DCB has been released the memory. readwritesplit.c:Replaced RSES_CLEINT_DCB macro with a function which returns client DCB for a given router client session.
This commit is contained in:
@ -323,8 +323,5 @@ typedef struct router_instance {
|
||||
#define BACKEND_TYPE(b) (SERVER_IS_MASTER((b)->backend_server) ? BE_MASTER : \
|
||||
(SERVER_IS_SLAVE((b)->backend_server) ? BE_SLAVE : BE_UNDEFINED));
|
||||
|
||||
#define RSES_SESSION(r) (r->rses_backend_ref->bref_dcb->session)
|
||||
|
||||
#define RSES_CLIENT_DCB(r) (RSES_SESSION(r)->client)
|
||||
|
||||
|
||||
#endif /*< _RWSPLITROUTER_H */
|
||||
|
Reference in New Issue
Block a user