Bug #55293 event_scheduler and SHOW PROCCESSLIST
Submitted: 15 Jul 2010 15:45 Modified: 16 Jul 2010 21:01
Reporter: Joe Grasse Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[15 Jul 2010 15:45] Joe Grasse
On http://dev.mysql.com/doc/refman/5.1/en/show-processlist.html where it explains the user column, it says "For system user or event_scheduler, there is no host specified in the Host column". However, under the explanation for the host it only says "The host name of the client issuing the statement (except for system user where there is no host)". Also, when you do "SHOW PROCESSLIST" on the server, the host column for the event scheduler shows "localhost". 

How to repeat:
Run "SHOW PROCESSLIST" on a server with the event scheduler running.

Suggested fix:
Since this is a system user, I think it should show the host column as blank just like the explanation for the SHOW PROCESSLIST user column says.

Either way the documentation should match what the server does.
[15 Jul 2010 16:02] Valeriy Kravchuk
I think server's behavior:

mysql> set global event_scheduler=1;
Query OK, 0 rows affected (0.00 sec)

mysql> show processlist;
| Id | User            | Host      | db   | Command | Time | State                  | Info             |
|  1 | root            | localhost | test | Query   |    0 | NULL                   | show processlist |
|  2 | event_scheduler | localhost | NULL | Daemon  |    2 | Waiting on empty queue | NULL             |
2 rows in set (0.00 sec)

should be just documented for this case.
[15 Jul 2010 16:12] Joe Grasse
That is definitely the easiest approach, but is that the correct one. Should all system threads be shown as coming from no host is a valid question i think.
[16 Jul 2010 19:19] Paul DuBois
For event_scheduler, I do observe that the host is localhost.

For system user (or system_use), I observe that the host is indeed blank. Do you find that system user threads sometimes have a nonblank host?

It seems the correct change to the description is to remove event_scheduler as an exception.
[16 Jul 2010 19:20] Paul DuBois
Typo. Previous comment should say "For system user (or system_user)".
[16 Jul 2010 19:26] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

event_scheduler has a Host value, so it is not an exception.
[16 Jul 2010 21:01] Joe Grasse
No, the system user always displays with a blank host. I was just saying that the event_scheduler user is not initiated by an outside client connections so maybe it should have a blank host as well.