Bug #261 show full processlist host column incorrect
Submitted: 9 Apr 2003 12:30 Modified: 9 Apr 2003 12:36
Reporter: Joe Read Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.12 OS:FreeBSD (FreeBSD 5.0-RELEASE)
Assigned to: CPU Architecture:Any

[9 Apr 2003 12:30] Joe Read
Description:
When I connect to an SQL server not on the current machine and do a "show full processlist", the "Host" column always shows me the IP of the local machine I'm connecting from rather then the IP of the machine that issued the listed query as was the 3.23.x behavior.

For example, I am connecting from 1.1.1.1 and the SQL server server is at 2.2.2.2:

# ifconfig em0
em0: flags=8443<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3<rxcsum,txcsum>
        inet 1.1.1.1 netmask 0xfffffff8 broadcast 1.1.1.255

# mysql -h 2.2.2.2
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4789 to server version: 4.0.12-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show full processlist;
+------+------+--------------------+-----------+-------------+------+---------
| Id   | User | Host               | db        | Command     | Time | State   
+------+------+--------------------+-----------+-------------+------+---------
|    4 | root | 1.1.1.1:2849       | mydb      | Sleep       | 22   | NULL    
|   40 | root | 1.1.1.1:2283       | myotherdb | Sleep       | 5    | NULL    
|   46 | root | 1.1.1.1:2288       | mydb3     | Sleep       | 10   | NULL    
|   64 | root | 1.1.1.1:49396      | NULL      | Binlog Dump | 1089 | Slave: w
+------+------+--------------------+-----------+-------------+------+---------
4 rows in set (0.14 sec)
mysql> \q

I know for a fact the server using mydb is at 1.1.1.3, the server using "myotherdb" is at 1.1.1.120, etc.  I always use 'root', but perhaps this could also be displaying the local connected user rather then the actual user who is running that query?  These servers are web servers running PHP 4.3.1 using persistant connections.

How to repeat:
Set up a server, connect to it from a remote mysql client, execute the query "show full processlist".
[9 Apr 2003 12:36] MySQL Verification Team
This is a known problem and already fixed in 4.0.13 branch.