Read write split router can reply the master packet to client in session change.

Mysql backend handles auth and session func.


The MYSQL_SESSION_CHANGE may be not in sync with authentication
This commit is contained in:
Massimiliano Pinto
2013-07-15 18:56:14 +02:00
parent 0d3e798b73
commit e0d9d45f3b
11 changed files with 129 additions and 28 deletions

View File

@ -42,7 +42,8 @@ struct service;
* 02/07/2013 Massimiliano Pinto Addition of delayqlock, delayq and authlock
* for handling backend asynchronous protocol connection
* and a generic lock for backend authentication
* 12/07/2013 Massimiliano Pinto Added auth and generic func pointers
* 12/07/2013 Massimiliano Pinto Added auth entry point
* 15/07/2013 Massimiliano Pinto Added session entry point
*
* @endverbatim
*/
@ -64,8 +65,8 @@ struct dcb;
* for the session pased in
* close Gateway close entry point for the socket
* listen Create a listener for the protocol
* auth Authentication entry point for backend server
* generic Geeneric purpose entry point
* auth Authentication entry point
* session Session handling entry point
* @endverbatim
*
* This forms the "module object" for protocol modules within the gateway.
@ -83,7 +84,7 @@ typedef struct gw_protocol {
int (*close)(struct dcb *);
int (*listen)(struct dcb *, char *);
int (*auth)(struct dcb *, struct server *, struct session *, GWBUF *);
int (*generic)(struct dcb *, void *);
int (*session)(struct dcb *, void *);
} GWPROTOCOL;
/**

View File

@ -23,10 +23,11 @@
*
* Revision History
*
* Date Who Description
* 14/06/13 Mark Riddoch Initial implementation
* 26/06/13 Mark Riddoch Addition of router options
* and the diagnostic entry point
* Date Who Description
* 14/06/2013 Mark Riddoch Initial implementation
* 26/06/2013 Mark Riddoch Addition of router options
* and the diagnostic entry point
* 15/07/2013 Massimiliano Pinto Added clientReply entry point
*
*/
#include <service.h>
@ -54,6 +55,8 @@ typedef void *ROUTER;
* routing
* diagnostics Called to force the router to print
* diagnostic output
* clientReply Called to reply to client the data from one or all backends
*
* @endverbatim
*
* @see load_module
@ -64,5 +67,6 @@ typedef struct router_object {
void (*closeSession)(ROUTER *instance, void *router_session);
int (*routeQuery)(ROUTER *instance, void *router_session, GWBUF *queue);
void (*diagnostics)(ROUTER *instance, DCB *dcb);
void (*clientReply)(ROUTER* instance, void* router_session, GWBUF* queue, DCB *backend_dcb);
} ROUTER_OBJECT;
#endif