Change binlog router to indicate it does not use router sessions via the getCapabilities interface.
This commit is contained in:
@ -30,6 +30,7 @@
|
|||||||
* 15/07/2013 Massimiliano Pinto Added clientReply entry point
|
* 15/07/2013 Massimiliano Pinto Added clientReply entry point
|
||||||
* 16/07/2013 Massimiliano Pinto Added router commands values
|
* 16/07/2013 Massimiliano Pinto Added router commands values
|
||||||
* 22/10/2013 Massimiliano Pinto Added router errorReply entry point
|
* 22/10/2013 Massimiliano Pinto Added router errorReply entry point
|
||||||
|
* 27/10/2015 Martin Brampton Add RCAP_TYPE_NO_RSESSION
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <service.h>
|
#include <service.h>
|
||||||
@ -100,8 +101,9 @@ typedef struct router_object {
|
|||||||
*/
|
*/
|
||||||
typedef enum router_capability_t {
|
typedef enum router_capability_t {
|
||||||
RCAP_TYPE_UNDEFINED = 0x00,
|
RCAP_TYPE_UNDEFINED = 0x00,
|
||||||
RCAP_TYPE_STMT_INPUT = 0x01, /*< statement per buffer */
|
RCAP_TYPE_STMT_INPUT = 0x01, /*< statement per buffer */
|
||||||
RCAP_TYPE_PACKET_INPUT = 0x02 /*< data as it was read from DCB */
|
RCAP_TYPE_PACKET_INPUT = 0x02, /*< data as it was read from DCB */
|
||||||
|
RCAP_TYPE_NO_RSESSION = 0x04 /*< router does not use router sessions */
|
||||||
} router_capability_t;
|
} router_capability_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
* 10/11/2014 Massimiliano Pinto Client charset is passed to backend
|
* 10/11/2014 Massimiliano Pinto Client charset is passed to backend
|
||||||
* 19/06/2015 Martin Brampton Persistent connection handling
|
* 19/06/2015 Martin Brampton Persistent connection handling
|
||||||
* 07/10/2015 Martin Brampton Remove calls to dcb_close - should be done by routers
|
* 07/10/2015 Martin Brampton Remove calls to dcb_close - should be done by routers
|
||||||
|
* 27/10/2015 Martin Brampton Test for RCAP_TYPE_NO_RSESSION before calling clientReply
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <modinfo.h>
|
#include <modinfo.h>
|
||||||
@ -577,7 +578,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
|||||||
if (dcb->session->state == SESSION_STATE_ROUTER_READY &&
|
if (dcb->session->state == SESSION_STATE_ROUTER_READY &&
|
||||||
dcb->session->client != NULL &&
|
dcb->session->client != NULL &&
|
||||||
dcb->session->client->state == DCB_STATE_POLLING &&
|
dcb->session->client->state == DCB_STATE_POLLING &&
|
||||||
session->router_session)
|
(session->router_session || router->getCapabilities(router_instance, NULL) & RCAP_TYPE_NO_RSESSION))
|
||||||
{
|
{
|
||||||
client_protocol = SESSION_PROTOCOL(dcb->session,
|
client_protocol = SESSION_PROTOCOL(dcb->session,
|
||||||
MySQLProtocol);
|
MySQLProtocol);
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
* 07/05/2015 Massimiliano Pinto Addition of MariaDB 10 compatibility support
|
* 07/05/2015 Massimiliano Pinto Addition of MariaDB 10 compatibility support
|
||||||
* 12/06/2015 Massimiliano Pinto Addition of MariaDB 10 events in diagnostics()
|
* 12/06/2015 Massimiliano Pinto Addition of MariaDB 10 events in diagnostics()
|
||||||
* 09/09/2015 Martin Brampton Modify error handler
|
* 09/09/2015 Martin Brampton Modify error handler
|
||||||
|
* 27/10/2015 Martin Brampton Amend getCapabilities to return RCAP_TYPE_NO_RSESSION
|
||||||
*
|
*
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
@ -1178,7 +1179,7 @@ static void rses_end_locked_router_action(ROUTER_SLAVE * rses)
|
|||||||
|
|
||||||
static uint8_t getCapabilities(ROUTER *inst, void *router_session)
|
static uint8_t getCapabilities(ROUTER *inst, void *router_session)
|
||||||
{
|
{
|
||||||
return 0;
|
return RCAP_TYPE_NO_RSESSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user