Bug #82962 max_digest_length connected to, not replaced by, performance_schema_max_digest_l
Submitted: 13 Sep 2016 0:52 Modified: 13 Mar 2017 14:52
Reporter: Trey Raymond Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6.31 OS:Any
Assigned to: CPU Architecture:Any
Tags: digest, documentation

[13 Sep 2016 0:52] Trey Raymond
Description:
http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_digest_leng...

"This variable was added in MySQL 5.6.24. Until 5.6.26, this variable applies to Performance Schema and to other server functions that use digests, such as MySQL Enterprise Firewall. As of 5.6.26, it no longer applies to Performance Schema; instead, use performance_schema_max_digest_length."

The documentation here says that max_digest_length no longer applies to perf schema, and to use the new var instead.  This is causing some confusion, as in reality, both still apply.  One is intended to be a limit on calculating, and the other on memory allocation.  The actual result is that the effective digest length in p_s is MIN(max_digest_length,performance_schema_max_digest_length).  That's the way I'd code it, so it seems intentional, but the docs say otherwise and should be updated.

How to repeat:
run a query which would result in a long digest in all four combinations of settings:
psmdl=low, mdl=low
psmdl=high, mdl=low
psmdl=high, mdl=high
psmdl=low, mdl=high

the third is the only one which will store the 'high' value length.

Suggested fix:
fix the docs!  i've been explaining this to people by relating it to the tmp_table_size/max_heap_table_size relationship which most are familiar with, might want to use similar verbage.  every square is a rectangle but no all rectangles are squares.
[16 Nov 2016 4:38] MySQL Verification Team
Hello Trey Raymond,

Thank you for the report and feedback.

Thanks,
Umesh
[13 Mar 2017 14:52] Paul DuBois
Posted by developer:
 
Docs updated:

https://dev.mysql.com/doc/refman/5.6/en/performance-schema-statement-digests.html
https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_digest_len...
https://dev.mysql.com/doc/refman/5.6/en/performance-schema-system-variables.html#sysvar_pe...