← Back to team overview

maria-developers team mailing list archive

Re: Audit plugin and qc_info plugin - MDEV-4682


Hi, Roberto!

On Aug 15, Roberto Spadim wrote:
> Hi guys, i put some fields in qc_info plugin
> https://mariadb.atlassian.net/browse/MDEV-4581
> the second part was add some others informations (stats):
> https://mariadb.atlassian.net/browse/MDEV-4682
> i was reading the "response_time_distribution" of percona, patch at
> https://mariadb.atlassian.net/browse/MDEV-4568
> could i use the audit plugin to implement MDEV-4682?
> what i need is:
> 1)know if the query was executed with/without query cache

There's no API for that. Perhaps, a plugin can get this information by
declaring MYSQL_SERVER, and looking at THD fields that are normally used
when a query is executed. Like, if they're NULL, the query was in the
query cache. Some hacks like that are, probably, possible.

> 2)know the time expend (lock time, and total time) to execute the
> query (first execution)

no lock time. query time can be calculated by measuring the time between

> 3)know the time expend with query cache hit

pardon me?

> 4) both (3) and (2) don't include time of network packages, just server
> side times...
> is it possible?
> any idea how could i implement it? i didn't write a audit plugin yet =(
> well.. time to learn =D

Audit API is very simple, you won't have any problems with it :)


Follow ups