Commit f4a1298f authored by Daniel Black's avatar Daniel Black Committed by GitHub

MDEV-12274: Too many connections warning in error log (#2213)

Because of the default warning level, aborted unauthenticated
connections are in the error log. These errors frequently occur
in production environments because cancelled connectiosn occur
all the time when web pages are shutdown.

Rather than flood our user's errors log with these ordinary
messages, lets push them down to the warning level at log-warnings=4
level.

Concept approved by Monty.
parent 6216a2df
......@@ -1263,7 +1263,8 @@ void prepare_new_connection_state(THD* thd)
and the main Diagnostics Area contains an error condition.
*/
if (packet_length != packet_error)
my_error(ER_NEW_ABORTING_CONNECTION, MYF(0),
my_error(ER_NEW_ABORTING_CONNECTION,
(thd->db.str || sctx->user) ? MYF(0) : MYF(ME_JUST_WARNING),
thd->thread_id,
thd->db.str ? thd->db.str : "unconnected",
sctx->user ? sctx->user : "unauthenticated",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment