Merge branch 'develop' into MAX-11
Conflicts: server/include/server.h server/modules/monitor/mysql_mon.c server/modules/protocol/mysql_client.c server/modules/routing/readwritesplit/readwritesplit.c utils/skygw_debug.h
This commit is contained in:
@ -39,6 +39,14 @@
|
||||
|
||||
#include <httpd.h>
|
||||
#include <gw.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_IN_DEVELOPMENT,
|
||||
GWPROTOCOL_VERSION,
|
||||
"An experimental HTTPD implementation for use in admnistration"
|
||||
};
|
||||
|
||||
#define ISspace(x) isspace((int)(x))
|
||||
#define HTTP_SERVER_STRING "Gateway(c) v.1.0.0"
|
||||
|
||||
@ -43,6 +43,14 @@
|
||||
* 27/09/2013 Massimiliano Pinto Changed in gw_read_backend_event the check for dcb_read(), now is if rc < 0
|
||||
*
|
||||
*/
|
||||
#include <modinfo.h>
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
GWPROTOCOL_VERSION,
|
||||
"The MySQL to backend server protocol"
|
||||
};
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
@ -1016,4 +1024,4 @@ static int gw_session(DCB *backend_dcb, void *data) {
|
||||
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -40,6 +40,14 @@
|
||||
#include <log_manager.h>
|
||||
#include <mysql_client_server_protocol.h>
|
||||
#include <gw.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
GWPROTOCOL_VERSION,
|
||||
"The client to MaxScale MySQL protocol implementation"
|
||||
};
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
@ -57,11 +65,7 @@ static int gw_client_hangup_event(DCB *dcb);
|
||||
int mysql_send_ok(DCB *dcb, int packet_number, int in_affected_rows, const char* mysql_message);
|
||||
int MySQLSendHandshake(DCB* dcb);
|
||||
static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue);
|
||||
static int route_by_statement(
|
||||
ROUTER* router_instance,
|
||||
ROUTER_OBJECT* router,
|
||||
void* rsession,
|
||||
GWBUF* read_buf);
|
||||
static int route_by_statement(SESSION *, GWBUF *);
|
||||
|
||||
/*
|
||||
* The "module object" for the mysqld client protocol module.
|
||||
@ -791,6 +795,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
|
||||
/** Route COM_QUIT to backend */
|
||||
if (mysql_command == '\x01') {
|
||||
<<<<<<< HEAD
|
||||
#if defined(ERRHANDLE)
|
||||
/**
|
||||
* Close router session and that closes
|
||||
@ -799,7 +804,11 @@ int gw_read_client_event(DCB* dcb) {
|
||||
*/
|
||||
dcb_close(dcb);
|
||||
#else
|
||||
router->routeQuery(router_instance, rsession, read_buffer);
|
||||
SESSION_ROUTE_QUERY(session, read_buffer);
|
||||
// router->routeQuery(router_instance, rsession, read_buffer);
|
||||
=======
|
||||
SESSION_ROUTE_QUERY(session, read_buffer);
|
||||
>>>>>>> develop
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_client_event] Routed COM_QUIT to "
|
||||
@ -818,10 +827,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
* Feed each statement completely and separately
|
||||
* to router.
|
||||
*/
|
||||
rc = route_by_statement(router_instance,
|
||||
router,
|
||||
rsession,
|
||||
read_buffer);
|
||||
rc = route_by_statement(session, read_buffer);
|
||||
if (read_buffer != NULL)
|
||||
{
|
||||
/** add incomplete mysql packet to read queue */
|
||||
@ -831,9 +837,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
else
|
||||
{
|
||||
/** Feed whole packet to router */
|
||||
rc = router->routeQuery(router_instance,
|
||||
rsession,
|
||||
read_buffer);
|
||||
rc = SESSION_ROUTE_QUERY(session, read_buffer);
|
||||
}
|
||||
|
||||
/** succeed */
|
||||
@ -1436,11 +1440,7 @@ gw_client_hangup_event(DCB *dcb)
|
||||
* Return 1 in success. If the last packet is incomplete return success but
|
||||
* leave incomplete packet to readbuf.
|
||||
*/
|
||||
static int route_by_statement(
|
||||
ROUTER* router_instance,
|
||||
ROUTER_OBJECT* router,
|
||||
void* rsession,
|
||||
GWBUF* readbuf)
|
||||
static int route_by_statement(SESSION *session, GWBUF *readbuf)
|
||||
{
|
||||
int rc = -1;
|
||||
GWBUF* packetbuf;
|
||||
@ -1452,7 +1452,7 @@ static int route_by_statement(
|
||||
if (packetbuf != NULL)
|
||||
{
|
||||
CHK_GWBUF(packetbuf);
|
||||
rc = router->routeQuery(router_instance, rsession, packetbuf);
|
||||
rc = SESSION_ROUTE_QUERY(session, packetbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -36,6 +36,14 @@
|
||||
#include <adminusers.h>
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
#include <modinfo.h>
|
||||
|
||||
MODULE_INFO info = {
|
||||
MODULE_API_PROTOCOL,
|
||||
MODULE_ALPHA_RELEASE,
|
||||
GWPROTOCOL_VERSION,
|
||||
"A telnet deamon protocol for simple administration interface"
|
||||
};
|
||||
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
|
||||
@ -140,9 +148,6 @@ telnetd_read_event(DCB* dcb)
|
||||
int n;
|
||||
GWBUF *head = NULL;
|
||||
SESSION *session = dcb->session;
|
||||
ROUTER_OBJECT *router = session->service->router;
|
||||
ROUTER *router_instance = session->service->router_instance;
|
||||
void *rsession = session->router_session;
|
||||
TELNETD *telnetd = (TELNETD *)dcb->protocol;
|
||||
char *password, *t;
|
||||
|
||||
@ -196,7 +201,7 @@ char *password, *t;
|
||||
free(password);
|
||||
break;
|
||||
case TELNETD_STATE_DATA:
|
||||
router->routeQuery(router_instance, rsession, head);
|
||||
SESSION_ROUTE_QUERY(session, head);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user