Bug #68753 Show processlist does not show variable values any more
Submitted: 22 Mar 2013 21:41 Modified: 3 Apr 2013 0:20
Reporter: Franjo Markovic Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.6.10 OS:Any
Assigned to: CPU Architecture:Any

[22 Mar 2013 21:41] Franjo Markovic
I am not able to see which exact values are used in current query.
Prior to 5.6.9, show processlist was showing me the value of each variable used in query, like:

select aaa from bbb where x=NAME_CONST('varName',12345)

but now, all I get this:

select aaa from bbb where x=varName

This was kind of important to me and I used it a lot, but now this feature is missing and there is no workaround.

How to repeat:
run any longer query or stored procedure that uses variables, and monitor processlist

Suggested fix:
Please bring back this functionality, as it existed in all versions up to 5.6.8.
[23 Mar 2013 5:29] Shane Bester
I remember benchmarking this, and a large amount of CPU time was spent on rewriting the query to make it visible in the logs/processlist.  maybe this should be enabled just in debug builds?  incurring an overhead for every query is harsh penalty to pay. or we need to optimize the rewriting code to make it faster?
[26 Mar 2013 16:45] Franjo Markovic
If there is a performance penalty for this, then, rather than just killing the functionality, it would be nicer to have an option (in my.ini) where users can choose if showing this detail is worth extra time for them.
[26 Mar 2013 17:06] Shane Bester
I believe the change I was talking about was introduced by this fix:


Enabling the binlog can bring back the old behavior.
In my testcase, 11% cpu time was spent rewriting the query (worst case scenario).
But I think it could make sense to have an option to re-enable it again if it's needed.
[3 Apr 2013 0:20] Franjo Markovic
I don't have access to see details of bug 14073554 (as neither general public does). Can you please explain the details/options when this feature is enabled? I have my server as replication master - isn't that the same/similar as binlog?
[29 Feb 2016 6:52] Ajo Robert
Posted by developer:
This functionality can be brought back by enabling statement binlog.

mysqld.exe --no-defaults --console --skip-grant-tables --log-bin --server-id=1 --binlog-format=statement 

mysql> show processlist;
| Id | User | Host      | db   | Command | Time | State      | Info                                                    |
|  1 | root | localhost | test | Query   |    1 | User sleep | select sleep(1) from t where a =  NAME_CONST('var_i',4) |
|  2 | root | localhost | test | Query   |    0 | init       | show processlist                                        |
2 rows in set (0.00 sec)

mysql> select version(); 
| version()        |
| 5.6.30-debug-log |
1 row in set (0.00 sec)