Remove unused function in mysql_common.cc

This commit is contained in:
Markus Mäkelä 2019-05-22 19:43:39 +03:00
parent 397fc97d07
commit 7eff7f8e9e
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 0 additions and 20 deletions

View File

@ -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 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);
static bool sescmd_response_complete(DCB* dcb);
static void gw_reply_on_error(DCB* dcb, mxs_auth_state_t state);
static int gw_read_and_write(DCB* dcb);

View File

@ -453,25 +453,6 @@ int mysql_send_auth_error(DCB* dcb,
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.
*