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
|
||||
* 16/07/2013 Massimiliano Pinto Added router commands values
|
||||
* 22/10/2013 Massimiliano Pinto Added router errorReply entry point
|
||||
* 27/10/2015 Martin Brampton Add RCAP_TYPE_NO_RSESSION
|
||||
*
|
||||
*/
|
||||
#include <service.h>
|
||||
@ -101,7 +102,8 @@ typedef struct router_object {
|
||||
typedef enum router_capability_t {
|
||||
RCAP_TYPE_UNDEFINED = 0x00,
|
||||
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;
|
||||
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
* 10/11/2014 Massimiliano Pinto Client charset is passed to backend
|
||||
* 19/06/2015 Martin Brampton Persistent connection handling
|
||||
* 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>
|
||||
@ -577,7 +578,7 @@ static int gw_read_backend_event(DCB *dcb) {
|
||||
if (dcb->session->state == SESSION_STATE_ROUTER_READY &&
|
||||
dcb->session->client != NULL &&
|
||||
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,
|
||||
MySQLProtocol);
|
||||
|
@ -38,6 +38,7 @@
|
||||
* 07/05/2015 Massimiliano Pinto Addition of MariaDB 10 compatibility support
|
||||
* 12/06/2015 Massimiliano Pinto Addition of MariaDB 10 events in diagnostics()
|
||||
* 09/09/2015 Martin Brampton Modify error handler
|
||||
* 27/10/2015 Martin Brampton Amend getCapabilities to return RCAP_TYPE_NO_RSESSION
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
@ -1178,7 +1179,7 @@ static void rses_end_locked_router_action(ROUTER_SLAVE * rses)
|
||||
|
||||
static uint8_t getCapabilities(ROUTER *inst, void *router_session)
|
||||
{
|
||||
return 0;
|
||||
return RCAP_TYPE_NO_RSESSION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user