Rename public types and constants in session.h

Preparing to split session.h into module and core sections.
This commit is contained in:
Esa Korhonen
2017-01-17 15:02:39 +02:00
parent 680401cf8e
commit fb771c8a2e
56 changed files with 241 additions and 241 deletions

View File

@ -53,7 +53,7 @@
*
*/
static int gw_create_backend_connection(DCB *backend, SERVER *server, SESSION *in_session);
static int gw_create_backend_connection(DCB *backend, SERVER *server, MXS_SESSION *in_session);
static int gw_read_backend_event(DCB* dcb);
static int gw_write_backend_event(DCB *dcb);
static int gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue);
@ -62,7 +62,7 @@ static int gw_backend_close(DCB *dcb);
static int gw_backend_hangup(DCB *dcb);
static int backend_write_delayqueue(DCB *dcb, GWBUF *buffer);
static void backend_set_delayqueue(DCB *dcb, GWBUF *queue);
static int gw_change_user(DCB *backend_dcb, SERVER *server, SESSION *in_session, GWBUF *queue);
static int gw_change_user(DCB *backend_dcb, SERVER *server, MXS_SESSION *in_session, GWBUF *queue);
static char *gw_backend_default_auth();
static GWBUF* process_response_data(DCB* dcb, GWBUF** readbuf, int nbytes_to_process);
extern char* create_auth_failed_msg(GWBUF* readbuf, char* hostaddr, uint8_t* sha1);
@ -168,7 +168,7 @@ static char *gw_backend_default_auth()
*/
static int gw_create_backend_connection(DCB *backend_dcb,
SERVER *server,
SESSION *session)
MXS_SESSION *session)
{
MySQLProtocol *protocol = NULL;
int rv = -1;
@ -614,7 +614,7 @@ gw_read_backend_event(DCB *dcb)
static void
gw_reply_on_error(DCB *dcb, mxs_auth_state_t state)
{
SESSION *session = dcb->session;
MXS_SESSION *session = dcb->session;
CHK_SESSION(session);
/* Only reload the users table if authentication failed and the
@ -705,7 +705,7 @@ static int
gw_read_and_write(DCB *dcb)
{
GWBUF *read_buffer = NULL;
SESSION *session = dcb->session;
MXS_SESSION *session = dcb->session;
int nbytes_read;
int return_code = 0;
@ -1119,13 +1119,13 @@ static int gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
*/
static int gw_error_backend_event(DCB *dcb)
{
SESSION* session;
MXS_SESSION* session;
void* rsession;
ROUTER_OBJECT* router;
ROUTER* router_instance;
GWBUF* errbuf;
bool succp;
session_state_t ses_state;
mxs_session_state_t ses_state;
CHK_DCB(dcb);
session = dcb->session;
@ -1246,13 +1246,13 @@ retblock:
*/
static int gw_backend_hangup(DCB *dcb)
{
SESSION* session;
MXS_SESSION* session;
void* rsession;
ROUTER_OBJECT* router;
ROUTER* router_instance;
bool succp;
GWBUF* errbuf;
session_state_t ses_state;
mxs_session_state_t ses_state;
CHK_DCB(dcb);
if (dcb->persistentstart)
@ -1346,7 +1346,7 @@ retblock:
*/
static int gw_backend_close(DCB *dcb)
{
SESSION* session;
MXS_SESSION* session;
GWBUF* quitbuf;
CHK_DCB(dcb);
@ -1450,7 +1450,7 @@ static int backend_write_delayqueue(DCB *dcb, GWBUF *buffer)
if (rc == 0)
{
SESSION *session = dcb->session;
MXS_SESSION *session = dcb->session;
CHK_SESSION(session);
ROUTER_OBJECT *router = session->service->router;
ROUTER *router_instance = session->service->router_instance;
@ -1493,7 +1493,7 @@ static int backend_write_delayqueue(DCB *dcb, GWBUF *buffer)
*/
static int gw_change_user(DCB *backend,
SERVER *server,
SESSION *in_session,
MXS_SESSION *in_session,
GWBUF *queue)
{
MYSQL_session *current_session = NULL;

View File

@ -79,7 +79,7 @@ static int gw_client_hangup_event(DCB *dcb);
static char *gw_default_auth();
static int gw_connection_limit(DCB *dcb, int limit);
static int MySQLSendHandshake(DCB* dcb);
static int route_by_statement(SESSION *, uint64_t, GWBUF **);
static int route_by_statement(MXS_SESSION *, uint64_t, GWBUF **);
static void mysql_client_auth_error_handling(DCB *dcb, int auth_val, int packet_number);
static int gw_read_do_authentication(DCB *dcb, GWBUF *read_buffer, int nbytes_read);
static int gw_read_normal_data(DCB *dcb, GWBUF *read_buffer, int nbytes_read);
@ -672,7 +672,7 @@ gw_read_do_authentication(DCB *dcb, GWBUF *read_buffer, int nbytes_read)
* is changed so that future data will go through the
* normal data handling function instead of this one.
*/
SESSION *session = session_alloc(dcb->service, dcb);
MXS_SESSION *session = session_alloc(dcb->service, dcb);
if (session != NULL)
{
@ -864,8 +864,8 @@ static bool process_client_commands(DCB* dcb, int bytes_available, GWBUF** buffe
static int
gw_read_normal_data(DCB *dcb, GWBUF *read_buffer, int nbytes_read)
{
SESSION *session;
session_state_t session_state_value;
MXS_SESSION *session;
mxs_session_state_t session_state_value;
uint64_t capabilities = 0;
session = dcb->session;
@ -923,7 +923,7 @@ gw_read_normal_data(DCB *dcb, GWBUF *read_buffer, int nbytes_read)
static int
gw_read_finish_processing(DCB *dcb, GWBUF *read_buffer, uint64_t capabilities)
{
SESSION *session = dcb->session;
MXS_SESSION *session = dcb->session;
uint8_t *payload = GWBUF_DATA(read_buffer);
MySQLProtocol *proto = (MySQLProtocol*)dcb->protocol;
CHK_PROTOCOL(proto);
@ -955,7 +955,7 @@ gw_read_finish_processing(DCB *dcb, GWBUF *read_buffer, uint64_t capabilities)
/** Feed whole packet to router, which will free it
* and return 1 for success, 0 for failure
*/
return_code = SESSION_ROUTE_QUERY(session, read_buffer) ? 0 : 1;
return_code = MXS_SESSION_ROUTE_QUERY(session, read_buffer) ? 0 : 1;
}
/* else return_code is still 0 from when it was originally set */
/* Note that read_buffer has been freed or transferred by this point */
@ -1286,7 +1286,7 @@ static void gw_process_one_new_client(DCB *client_dcb)
static int gw_error_client_event(DCB* dcb)
{
SESSION* session;
MXS_SESSION* session;
CHK_DCB(dcb);
@ -1316,7 +1316,7 @@ retblock:
static int
gw_client_close(DCB *dcb)
{
SESSION* session;
MXS_SESSION* session;
ROUTER_OBJECT* router;
void* router_instance;
#if defined(SS_DEBUG)
@ -1378,7 +1378,7 @@ gw_client_close(DCB *dcb)
*/
static int gw_client_hangup_event(DCB *dcb)
{
SESSION* session;
MXS_SESSION* session;
CHK_DCB(dcb);
session = dcb->session;
@ -1415,7 +1415,7 @@ retblock:
*
* @return 1 if succeed,
*/
static int route_by_statement(SESSION* session, uint64_t capabilities, GWBUF** p_readbuf)
static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF** p_readbuf)
{
int rc;
GWBUF* packetbuf;
@ -1496,7 +1496,7 @@ static int route_by_statement(SESSION* session, uint64_t capabilities, GWBUF** p
}
else
{
session_trx_state_t trx_state;
mxs_session_trx_state_t trx_state;
if (type & QUERY_TYPE_WRITE)
{
trx_state = SESSION_TRX_READ_WRITE;
@ -1527,7 +1527,7 @@ static int route_by_statement(SESSION* session, uint64_t capabilities, GWBUF** p
}
/** Route query */
rc = SESSION_ROUTE_QUERY(session, packetbuf);
rc = MXS_SESSION_ROUTE_QUERY(session, packetbuf);
}
else
{