Removed old mysql protocol files
This commit is contained in:
@ -59,7 +59,7 @@ SRCS= atomic.c buffer.c spinlock.c gateway.c \
|
|||||||
monitor.c adminusers.c secrets.c
|
monitor.c adminusers.c secrets.c
|
||||||
|
|
||||||
HDRS= ../include/atomic.h ../include/buffer.h ../include/dcb.h \
|
HDRS= ../include/atomic.h ../include/buffer.h ../include/dcb.h \
|
||||||
../include/gateway_mysql.h ../include/gw.h ../include/mysql_protocol.h \
|
../include/gw.h ../include/mysql_protocol.h \
|
||||||
../include/session.h ../include/spinlock.h ../include/thread.h \
|
../include/session.h ../include/spinlock.h ../include/thread.h \
|
||||||
../include/modules.h ../include/poll.h ../include/config.h \
|
../include/modules.h ../include/poll.h ../include/config.h \
|
||||||
../include/users.h ../include/hashtable.h ../include/gwbitmask.h \
|
../include/users.h ../include/hashtable.h ../include/gwbitmask.h \
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include <gw.h>
|
#include <gw.h>
|
||||||
#include <dcb.h>
|
#include <dcb.h>
|
||||||
#include <session.h>
|
#include <session.h>
|
||||||
#include <mysql_protocol.h>
|
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <skygw_utils.h>
|
#include <skygw_utils.h>
|
||||||
|
@ -45,8 +45,6 @@
|
|||||||
#define MYSQL_CONN_DEBUG
|
#define MYSQL_CONN_DEBUG
|
||||||
#undef MYSQL_CONN_DEBUG
|
#undef MYSQL_CONN_DEBUG
|
||||||
|
|
||||||
#include "gateway_mysql.h"
|
|
||||||
#include "mysql_protocol.h"
|
|
||||||
#include "dcb.h"
|
#include "dcb.h"
|
||||||
|
|
||||||
void gw_daemonize(void);
|
void gw_daemonize(void);
|
||||||
@ -54,11 +52,9 @@ int do_read_dcb(DCB *dcb);
|
|||||||
void MySQLListener(int epfd, char *config_bind);
|
void MySQLListener(int epfd, char *config_bind);
|
||||||
int MySQLAccept(DCB *listener);
|
int MySQLAccept(DCB *listener);
|
||||||
int gw_mysql_do_authentication(DCB *dcb, GWBUF *);
|
int gw_mysql_do_authentication(DCB *dcb, GWBUF *);
|
||||||
void gw_mysql_close(MySQLProtocol **ptr);
|
|
||||||
char *gw_strend(register const char *s);
|
char *gw_strend(register const char *s);
|
||||||
int do_read_dcb(DCB *dcb);
|
int do_read_dcb(DCB *dcb);
|
||||||
int do_read_10(DCB *dcb, uint8_t *buffer);
|
int do_read_10(DCB *dcb, uint8_t *buffer);
|
||||||
MySQLProtocol * gw_mysql_init(MySQLProtocol *ptr);
|
|
||||||
int MySQLWrite(DCB *dcb, GWBUF *queue);
|
int MySQLWrite(DCB *dcb, GWBUF *queue);
|
||||||
int gw_write_backend_event(DCB *dcb);
|
int gw_write_backend_event(DCB *dcb);
|
||||||
int gw_read_backend_event(DCB *dcb);
|
int gw_read_backend_event(DCB *dcb);
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
#ifndef _MYSQL_PROTOCOL_H
|
|
||||||
#define _MYSQL_PROTOCOL_H
|
|
||||||
/*
|
|
||||||
* This file is distributed as part of the SkySQL Gateway. It is free
|
|
||||||
* software: you can redistribute it and/or modify it under the terms of the
|
|
||||||
* GNU General Public License as published by the Free Software Foundation,
|
|
||||||
* version 2.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Copyright SkySQL Ab 2013
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Revision History
|
|
||||||
*
|
|
||||||
* Date Who Description
|
|
||||||
* 01-06-2013 Mark Riddoch Initial implementation
|
|
||||||
* 14-06-2013 Massimiliano Pinto Added specific data
|
|
||||||
* for MySQL session
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MYSQL_SCRAMBLE_LEN
|
|
||||||
#define MYSQL_SCRAMBLE_LEN GW_MYSQL_SCRAMBLE_SIZE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MYSQL_USER_MAXLEN 128
|
|
||||||
#define MYSQL_DATABASE_MAXLEN 128
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
MYSQL_ALLOC,
|
|
||||||
MYSQL_AUTH_SENT,
|
|
||||||
MYSQL_AUTH_RECV,
|
|
||||||
MYSQL_AUTH_FAILED,
|
|
||||||
MYSQL_IDLE,
|
|
||||||
MYSQL_ROUTING,
|
|
||||||
MYSQL_WAITING_RESULT,
|
|
||||||
} mysql_pstate_t;
|
|
||||||
|
|
||||||
struct dcb;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MySQL Protocol specific state data
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
skygw_chk_t protocol_chk_top;
|
|
||||||
int fd; /**< The socket descriptor */
|
|
||||||
struct dcb *descriptor; /**< The DCB of the socket we are running on */
|
|
||||||
mysql_pstate_t state; /**< Current descriptor state */
|
|
||||||
char scramble[MYSQL_SCRAMBLE_LEN]; /**< server scramble, created or received */
|
|
||||||
uint32_t server_capabilities; /**< server capabilities, created or received */
|
|
||||||
uint32_t client_capabilities; /**< client capabilities, created or received */
|
|
||||||
unsigned long tid; /**< MySQL Thread ID, in handshake */
|
|
||||||
skygw_chk_t protocol_chk_tail;
|
|
||||||
} MySQLProtocol;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MySQL session specific data
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef struct mysql_session {
|
|
||||||
uint8_t client_sha1[MYSQL_SCRAMBLE_LEN]; /**< SHA1(passowrd) */
|
|
||||||
char user[MYSQL_USER_MAXLEN]; /**< username */
|
|
||||||
char db[MYSQL_DATABASE_MAXLEN]; /**< database */
|
|
||||||
} MYSQL_session;
|
|
||||||
|
|
||||||
#endif
|
|
Reference in New Issue
Block a user