2908 Alexander Nozdrin 2009-10-21
Backport WL#4098 from 6.0.
The value was changed from 1024 to 2048,
because 1024 is already used.
Original revision:
------------------------------------------------------------
revno: 2476.657.259
committer: tsmith@stripped
timestamp: Tue 2008-01-29 19:32:44 +0100
message:
WL#4098: Add a status flag for slow queries
Add new result set status flag SERVER_QUERY_WAS_SLOW in mysql_com.h.
There is no server-side implementation to actually set this flag at this
time. This patch simply defines the interface so that applications can
make use of it. See the worklog for background.
------------------------------------------------------------
modified:
include/mysql_com.h
2907 Alexander Nozdrin 2009-10-21
Backporting WL#3953 from 6.0. Original revision:
------------------------------------------------------------
revno: 2476.714.9
committer: markleith@stripped
timestamp: Mon 2007-09-03 23:18:50 +0100
message:
Bug#25822 / WL#3953 - Log Access Denied errors for bad passwords in the error log
Added logging of Access Denied messages on failed new connections to the
error log when log-warnings = 2.
This allows a user to log these messages without having to incur the overhead
of using the general query log on production systems.
------------------------------------------------------------
modified:
sql/sql_connect.cc
2906 Evgeny Potemkin 2009-10-20 [merge]
Auto-merged fix for the bug#41760.
modified:
mysql-test/r/delayed.result
mysql-test/r/insert.result
mysql-test/t/delayed.test
mysql-test/t/insert.test
sql/sql_insert.cc
=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h 2008-05-20 16:36:26 +0000
+++ b/include/mysql_com.h 2009-10-21 14:10:19 +0000
@@ -203,6 +203,7 @@ enum enum_server_command
number of result set columns.
*/
#define SERVER_STATUS_METADATA_CHANGED 1024
+#define SERVER_QUERY_WAS_SLOW 2048
/**
Server status flags that must be cleared when starting
=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc 2009-09-30 20:10:22 +0000
+++ b/sql/sql_connect.cc 2009-10-21 14:00:58 +0000
@@ -486,6 +486,18 @@ check_user(THD *thd, enum enum_server_co
thd->main_security_ctx.user,
thd->main_security_ctx.host_or_ip,
passwd_len ? ER(ER_YES) : ER(ER_NO));
+ /*
+ log access denied messages to the error log when log-warnings = 2
+ so that the overhead of the general query log is not required to track
+ failed connections
+ */
+ if (global_system_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 */
}
Attachment: [text/bzr-bundle] bzr/alik@sun.com-20091021141019-lhf1nxf170fiqjid.bundle
| Thread |
|---|
| • bzr push into mysql-5.5.0-next-mr-bugfixing branch (alik:2906 to 2908)WL#4098 | Alexander Nozdrin | 21 Oct |