Bug #74452 Advisor for prepared statements should take prepared statement use in account
Submitted: 20 Oct 2014 11:10 Modified: 20 Oct 2014 13:03
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S3 (Non-critical)
Version:3.0.14 OS:Any
Assigned to: CPU Architecture:Any

[20 Oct 2014 11:10] Daniël van Eeden
Description:
Advisor: "Default Value Being Used For max_prepared_stmt_count"

This is the current rule:
%max_prepared_stmt_count% == THRESHOLD 

This will fire even if prepared statements are not used.

It should take one of these in account:
- mysql:status:Com_prepare_sql
- mysql:status:Com_stmt_prepare
- mysql:status:Prepared_stmt_count

So it should be something like this:
(%comprepare% > 0) && (%max_prepared_stmt_count% == THRESHOLD)

How to repeat:
Deploy agent

Suggested fix:
Make sure the rule doesn't fire when prepared statements aren't used.
[20 Oct 2014 13:03] Mark Leith
Verifying, thanks for the reasonable feature request.