MCPcopy Create free account
hub / github.com/MariaDB/server / login_failed_error

Function login_failed_error

sql/sql_acl.cc:13737–13761  ·  view source on GitHub ↗

a helper function to report an access denied error in most proper places */

Source from the content-addressed store, hash-verified

13735 a helper function to report an access denied error in most proper places
13736*/
13737static void login_failed_error(THD *thd)
13738{
13739 my_error(access_denied_error_code(thd->password), MYF(0),
13740 thd->main_security_ctx.user,
13741 thd->main_security_ctx.host_or_ip,
13742 thd->password ? ER_THD(thd, ER_YES) : ER_THD(thd, ER_NO));
13743 general_log_print(thd, COM_CONNECT,
13744 ER_THD(thd, access_denied_error_code(thd->password)),
13745 thd->main_security_ctx.user,
13746 thd->main_security_ctx.host_or_ip,
13747 thd->password ? ER_THD(thd, ER_YES) : ER_THD(thd, ER_NO));
13748 status_var_increment(thd->status_var.access_denied_errors);
13749 /*
13750 Log access denied messages to the error log when log-warnings = 2
13751 so that the overhead of the general query log is not required to track
13752 failed connections.
13753 */
13754 if (global_system_variables.log_warnings > 1)
13755 {
13756 sql_print_warning(ER_DEFAULT(access_denied_error_code(thd->password)),
13757 thd->main_security_ctx.user,
13758 thd->main_security_ctx.host_or_ip,
13759 thd->password ? ER_THD(thd, ER_YES) : ER_THD(thd, ER_NO));
13760 }
13761}
13762
13763/**
13764 sends a server handshake initialization packet, the very first packet

Callers 2

find_mpvio_userFunction · 0.85
acl_authenticateFunction · 0.85

Calls 4

my_errorFunction · 0.85
access_denied_error_codeFunction · 0.85
general_log_printFunction · 0.85
sql_print_warningFunction · 0.70

Tested by

no test coverage detected