Remove unused function in mysql_common.cc
This commit is contained in:
@ -44,7 +44,6 @@ static void backend_set_delayqueue(DCB* dcb, GWBUF* queue);
|
|||||||
static int gw_change_user(DCB* backend_dcb, SERVER* server, MXS_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 char* gw_backend_default_auth();
|
||||||
static GWBUF* process_response_data(DCB* dcb, GWBUF** readbuf, int nbytes_to_process);
|
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);
|
|
||||||
static bool sescmd_response_complete(DCB* dcb);
|
static bool sescmd_response_complete(DCB* dcb);
|
||||||
static void gw_reply_on_error(DCB* dcb, mxs_auth_state_t state);
|
static void gw_reply_on_error(DCB* dcb, mxs_auth_state_t state);
|
||||||
static int gw_read_and_write(DCB* dcb);
|
static int gw_read_and_write(DCB* dcb);
|
||||||
|
@ -453,25 +453,6 @@ int mysql_send_auth_error(DCB* dcb,
|
|||||||
return sizeof(mysql_packet_header) + mysql_payload_size;
|
return sizeof(mysql_packet_header) + mysql_payload_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* create_auth_failed_msg(GWBUF* readbuf,
|
|
||||||
char* hostaddr,
|
|
||||||
uint8_t* sha1)
|
|
||||||
{
|
|
||||||
char* errstr;
|
|
||||||
char* uname = (char*)GWBUF_DATA(readbuf) + 5;
|
|
||||||
const char* ferrstr = "Access denied for user '%s'@'%s' (using password: %s)";
|
|
||||||
|
|
||||||
/** -4 comes from 2X'%s' minus terminating char */
|
|
||||||
errstr = (char*)MXS_MALLOC(strlen(uname) + strlen(ferrstr) + strlen(hostaddr) + strlen("YES") - 6 + 1);
|
|
||||||
|
|
||||||
if (errstr != NULL)
|
|
||||||
{
|
|
||||||
sprintf(errstr, ferrstr, uname, hostaddr, (*sha1 == '\0' ? "NO" : "YES"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return errstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a message error string to send via MySQL ERR packet.
|
* Create a message error string to send via MySQL ERR packet.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user