Hi, Eric! On Aug 25, Eric Bergen wrote:
Why wouldn't you introduce a persistent session query counter? Like, put it in thd, increment on every query, and show this number in profiling and userstat.
I did that. It functions fine but it means that someone enabling profiling mid way through a session won't start with profile id 1 like they used to.
I think that's fine.
Indeed, both profiling and userstat need to keep the list of queries. It would make sense to have internal query history API, something like:
enable_query_history() - can be called by profiling or userstat disable_query_history() get_query_str(id) get_query_count()
If everyone is ok with the profile id issue I highlighted above and having this change impact both profiling and table statistics I can go ahead and implement it.
Regards, Sergei