Complementary fix to #694,http://bugs.mariadb.com/show_bug.cgi?id=694
RWSplit router handles query processing errors that happened in router by sending parse error reply to client. routeQuery fails only when backend has failed.
This commit is contained in:
@ -50,6 +50,7 @@ extern int modutil_send_mysql_err_packet(DCB *, int, int, int, const char *, con
|
||||
GWBUF* modutil_get_next_MySQL_packet(GWBUF** p_readbuf);
|
||||
GWBUF* modutil_get_complete_packets(GWBUF** p_readbuf);
|
||||
int modutil_MySQL_query_len(GWBUF* buf, int* nbytes_missing);
|
||||
void modutil_reply_parse_error(DCB* backend_dcb, char* errstr);
|
||||
|
||||
GWBUF *modutil_create_mysql_err_msg(
|
||||
int packet_number,
|
||||
|
||||
@ -43,6 +43,11 @@
|
||||
*/
|
||||
typedef void *ROUTER;
|
||||
|
||||
typedef enum error_action {
|
||||
ERRACT_NEW_CONNECTION = 0x001,
|
||||
ERRACT_REPLY_CLIENT = 0x002,
|
||||
ERRACT_RESET = 0x004
|
||||
} error_action_t;
|
||||
|
||||
/**
|
||||
* @verbatim
|
||||
@ -66,13 +71,6 @@ typedef void *ROUTER;
|
||||
*
|
||||
* @see load_module
|
||||
*/
|
||||
typedef enum error_action {
|
||||
ERRACT_NEW_CONNECTION = 0x001,
|
||||
ERRACT_REPLY_CLIENT = 0x002,
|
||||
ERRACT_RESET = 0x004
|
||||
} error_action_t;
|
||||
|
||||
|
||||
typedef struct router_object {
|
||||
ROUTER *(*createInstance)(SERVICE *service, char **options);
|
||||
void *(*newSession)(ROUTER *instance, SESSION *session);
|
||||
|
||||
Reference in New Issue
Block a user