diff --git a/lib/MySQL_Logger.cpp b/lib/MySQL_Logger.cpp index 6cc7bf8fba..8239061caa 100644 --- a/lib/MySQL_Logger.cpp +++ b/lib/MySQL_Logger.cpp @@ -640,8 +640,8 @@ void MySQL_Logger::log_audit_entry(log_event_type _et, MySQL_Session *sess, MySQ } cl=strlen(ca); - char *un = ""; - char *sn = ""; + char *un = (char *)""; + char *sn = (char *)""; if (ui) { if (ui->username) { un = ui->username; diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index a9809e2398..782fac8686 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -4080,7 +4080,7 @@ void MySQL_Session::handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE( proxy_debug(PROXY_DEBUG_MYSQL_CONNECTION, 5, "Too many connections\n"); client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,_pid,1040,(char *)"08004", (char *)"Too many connections", true); proxy_warning("mysql-max_connections reached. Returning 'Too many connections'\n"); - GloMyLogger->log_audit_entry(PROXYSQL_MYSQL_AUTH_ERR, this, NULL, "mysql-max_connections reached"); + GloMyLogger->log_audit_entry(PROXYSQL_MYSQL_AUTH_ERR, this, NULL, (char *)"mysql-max_connections reached"); __sync_fetch_and_add(&MyHGM->status.access_denied_max_connections, 1); } else { // see issue #794 __sync_fetch_and_add(&MyHGM->status.access_denied_max_user_connections, 1);