Statistics should be tracked at 3 different levels, per query, per session, and globally.
Currently, we only track this globally.
Background: A patch was submitted to 5.2 in 2011 and 2012 that did this. Details are now difficult to find and involve the wayback machine. Here is some information: https://planet.mysql.com/entry/?id=28194
I am unable to locate the patch that was submitted itself, but it was not put into the codebase.
Customer continued using patched 5.2 until now and cannot upgrade without this feature.