Hi Kristofer,
kpettersson@stripped wrote:
[..]
>
> sql/sql_parse.cc@stripped, 2008-04-03 15:40:12+02:00, thek@adventure.(none) +15 -0
> To be backward compatible with 4.0 and at the same time extend the
> interpretation of the Question variable, it should be increased on
> all COM-commands but COM_STATISTICS, COM_PING, COM_STMT_PREPARE,
> COM_STMT_CLOSE and COM_STMT_RESET.
> Since COM_QUERY can process multiple statements, there has to be an
> extra increase there as well.
>
Why don't we log COM_QUERY commands only?
[..]
> diff -Nrup a/sql/sql_class.h b/sql/sql_class.h
> --- a/sql/sql_class.h 2008-03-18 11:54:34 +01:00
> +++ b/sql/sql_class.h 2008-04-03 15:40:12 +02:00
> @@ -461,6 +461,12 @@ typedef struct system_status_var
> global status variable counter
> */
> double last_query_cost;
> +
> + /*
> + Number of statements sent from the client
> + */
> + ulong questions;
> +
> } STATUS_VAR;
>
This will make the variable to be session bound, yet it should count all
statements that clients have sent to the server. Missing test case
should show this..
Regards,
--
Davi Arnaut, Software Engineer
MySQL Inc, www.mysql.com