diff -ru a/sql/sql_db.cc b/sql/sql_db.cc --- a/sql/sql_db.cc 2009-02-07 15:06:32.000000000 +0900 +++ b/sql/sql_db.cc 2009-03-13 19:01:15.000000000 +0900 @@ -1334,6 +1334,9 @@ new_db_file_name.str); mysql_log.write(thd, COM_INIT_DB, ER(ER_DBACCESS_DENIED_ERROR), sctx->priv_user, sctx->priv_host, new_db_file_name.str); + if (!thd->killed && thd->variables.log_warnings > 1) + sql_print_warning(ER(ER_DBACCESS_DENIED_ERROR), + sctx->priv_user, sctx->priv_host, new_db_file_name.str); my_free(new_db_file_name.str, MYF(0)); DBUG_RETURN(TRUE); } diff -ru a/sql/sql_parse.cc b/sql/sql_parse.cc --- a/sql/sql_parse.cc 2009-02-07 15:06:33.000000000 +0900 +++ b/sql/sql_parse.cc 2009-03-13 18:57:55.000000000 +0900 @@ -364,6 +364,8 @@ { net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE); mysql_log.write(thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE)); + if (!thd->killed && thd->variables.log_warnings > 1) + sql_print_warning(ER(ER_NOT_SUPPORTED_AUTH_MODE)); DBUG_RETURN(-1); } if (passwd_len != 0 && @@ -399,6 +401,12 @@ mysql_log.write(thd, COM_CONNECT, ER(ER_SERVER_IS_IN_SECURE_AUTH_MODE), thd->main_security_ctx.user, thd->main_security_ctx.host_or_ip); + if (!thd->killed && thd->variables.log_warnings > 1) + { + sql_print_warning(ER(ER_SERVER_IS_IN_SECURE_AUTH_MODE), + thd->main_security_ctx.user, + thd->main_security_ctx.host_or_ip); + } DBUG_RETURN(-1); } /* We have to read very specific packet size */ @@ -501,6 +509,8 @@ { net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE); mysql_log.write(thd,COM_CONNECT,ER(ER_NOT_SUPPORTED_AUTH_MODE)); + if (!thd->killed && thd->variables.log_warnings > 1) + sql_print_warning(ER(ER_NOT_SUPPORTED_AUTH_MODE)); DBUG_RETURN(-1); } net_printf_error(thd, ER_ACCESS_DENIED_ERROR, @@ -511,6 +521,13 @@ thd->main_security_ctx.user, thd->main_security_ctx.host_or_ip, passwd_len ? ER(ER_YES) : ER(ER_NO)); + if (!thd->killed && thd->variables.log_warnings > 1) + { + sql_print_warning(ER(ER_ACCESS_DENIED_ERROR), + thd->main_security_ctx.user, + thd->main_security_ctx.host_or_ip, + passwd_len ? ER(ER_YES) : ER(ER_NO)); + } DBUG_RETURN(-1); #endif /* NO_EMBEDDED_ACCESS_CHECKS */ } diff -ru a/sql/sql_show.cc b/sql/sql_show.cc --- a/sql/sql_show.cc 2009-02-07 15:06:33.000000000 +0900 +++ b/sql/sql_show.cc 2009-03-13 21:49:44.000000000 +0900 @@ -492,6 +492,9 @@ sctx->priv_user, sctx->host_or_ip, dbname); mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR), sctx->priv_user, sctx->host_or_ip, dbname); + if (!thd->killed && thd->variables.log_warnings > 1) + sql_print_warning(ER(ER_DBACCESS_DENIED_ERROR), + sctx->priv_user, sctx->host_or_ip, dbname); DBUG_RETURN(TRUE); } #endif