Change binlog router to indicate it does not use router sessions via the getCapabilities interface.

This commit is contained in:
counterpoint
2015-10-27 14:17:06 +00:00
parent f18d921f4c
commit bad61b0740
3 changed files with 8 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}
/**