mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-19277: Add status variable that gets incremented if connection is aborted prior to authentication
MDEV-19282: Log more specific warning with log_warnings=2 if connection is aborted prior to authentication
This commit is contained in:
@ -1036,12 +1036,16 @@ static int check_connection(THD *thd)
|
||||
*/
|
||||
statistic_increment(connection_errors_peer_addr, &LOCK_status);
|
||||
my_error(ER_BAD_HOST_ERROR, MYF(0));
|
||||
statistic_increment(aborted_connects_preauth, &LOCK_status);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (thd_set_peer_addr(thd, &net->vio->remote, ip, peer_port,
|
||||
true, &connect_errors))
|
||||
{
|
||||
statistic_increment(aborted_connects_preauth, &LOCK_status);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else /* Hostname given means that the connection was on a socket */
|
||||
{
|
||||
@ -1069,6 +1073,7 @@ static int check_connection(THD *thd)
|
||||
*/
|
||||
statistic_increment(aborted_connects,&LOCK_status);
|
||||
statistic_increment(connection_errors_internal, &LOCK_status);
|
||||
statistic_increment(aborted_connects_preauth, &LOCK_status);
|
||||
return 1; /* The error is set by alloc(). */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user