log_warnings doesn't seem to work for aborted connections in MySQL 5.1
This seems to be an elusive bug nobody wants to fix


http://bugs.mysql.com/bug.php?id=24761 (2006-12-01 : Status Triaged)
http://bugs.mysql.com/bug.php?id=41602 (2008-12-18 : Status Closed)
https://serverfault.com/questions/235369/how-can-i-get-mysql-5-5-to-log-warnings-to-one-of-the-log-files (2011-02-14)


According to http://bugs.mysql.com/bug.php?id=24761, the aborted connect is recorded in the general log

[29 Sep 2008 8:03] Konstantin Osipov
OK, it was fixed differently:
      /*
        Log the command before authentication checks, so that the user can
        check the log for the tried login tried and also to detect
        break-in attempts.
      */
      general_log_print(thd, command,
                        (thd-&gt;main_security_ctx.priv_user ==
                         thd-&gt;main_security_ctx.user ?
                         (char*) "%s@%s on %s" :
                         (char*) "%s@%s as anonymous on %s"),
                        thd-&gt;main_security_ctx.user,
                        thd-&gt;main_security_ctx.host_or_ip,
                        db ? db : (char*) "");

So, this is logged in the general log at least.

I was reviewing a patch that added more logging,
but I can't remember the worklog task number.


We just have to wait on MySQL (I mean Oracle) to fix it. (That was sarcasm)