Bug #48344 have_profiling variable not documented and should probably be removed
Submitted: 27 Oct 2009 9:16 Modified: 4 May 2012 16:34
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.86, 55.6 OS:Any
Assigned to: Georgi Kodinov
Tags: qc
Triage: Triaged: D4 (Minor)

[27 Oct 2009 9:16] Peter Laursen
'have_profiling' variable existing in 5.0.x (but not in 5.1.x) is not documented and should probably be removed. 

Doc link:

I may have contributed to confusion myself due to this old report:

.. however at that time nothing about variables related to PROFILING was documented to my best knowledge.

How to repeat:
in 5.0.86
SHOW VARIABLES LIKE '%profiling%';

Variable_name           Value 
----------------------  ------
have_profiling          YES   
profiling               OFF   
profiling_history_size  15    

in 5.1.40
SHOW VARIABLES LIKE '%profiling%';

Variable_name           Value 
----------------------  ------
profiling               OFF   
profiling_history_size  15    

Suggested fix:
Preferably remove 'have_profiling' from 5.0.x for consistency.
[27 Oct 2009 9:25] Valerii Kravchuk
I think this variable should just be properly documented for 5.0.
[28 Oct 2009 17:56] Paul Dubois
This is a server bug, not a docs bug. The variable for community features like profiling ishave_community_features now. For some reason, in 5.0.82, when have_community_features was added, have_profiling was added, too. It should not have been.So in 5.0, have_community_features should be left in, but have_profiling should be removed.

The docs issue is that have_community_features isn't documented in the 5.0 manual, but I may defer that until a developer has a chance to weigh in here with what will be done in the 5.0 server code.
[28 Oct 2009 18:09] Paul Dubois
Additional information. I see that Bug#44651 renames have_community_features to have_profiling in MySQL 5.5 and up. So we have this situation:

5.5+: have_profiling
5.4: have_community_features
5.1: have_community_features
5.0: have_community_features *and* have_profiling!

I agree that there may need to be docs changes here, but the 5.0 server code is weird. What is supposed to be the situation here?
[28 Oct 2009 21:06] Paul Dubois
Another thing: If it is decided to leave have_community_features or have_profiling in 5.0, neither of them is displayed in proper lexical order in the SHOW VARIABLES output. That needs to be fixed.
[29 Oct 2009 16:43] Paul Dubois
See also Bug#44651.
[21 Dec 2009 16:33] Peter Laursen
Maybe with reference to http://bugs.mysql.com/bug.php?id=44651 this one here can be closed now too?
[2 Oct 2010 8:17] Peter Laursen
[2 Oct 2010 8:23] Peter Laursen
There is a regression in 5.5!

SELECT VERSION(); -- 5.5.6-rc

Variable_name           Value 
----------------------  ------
have_profiling          YES   
profiling               OFF   
profiling_history_size  15    

SELECT VERSION(); -- 5.1.51-community

Variable_name           Value 
----------------------  ------
profiling               OFF   
profiling_history_size  15       

So what now?
[2 Oct 2010 9:13] Peter Laursen
OK .. documentation at 
.. lists both (unlike http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html)


YES if statement profiling is enabled, NO if not. See Section, “SHOW PROFILE Syntax”.


If set to 0 (the default), statement profiling is disabled. If set to 1, statement profiling is enabled and the SHOW PROFILES and SHOW PROFILE statements provide access to profiling information. See Section, “SHOW PROFILES Syntax”.

If MySQL wants to keep both for some backwards compatibility reason I have no issues. But 

1) they most then be *complete synonyms*?  I so docs should state this. And if they are not *complete synonyms* docs should explain the difference.
2) one is described using 0|1 parameters and the other using YES|NO parameters and refers section and section respectively what is a minor inconsistency in docs.
[9 Apr 2012 9:16] Georgi Kodinov
have_profiling is a *read-only* variable that shows whether the profiling code is present in MySQL or not.

"profiling" is a *read-write* variable that controls whether profiling information is actually collected or not. 

So they're not the same thing (despite the similarly sounding names).
[9 Apr 2012 9:25] Peter Laursen
In that case why is 'have_profiling' not in 5.1?
[9 Apr 2012 9:33] Georgi Kodinov
Because it's called "have_community_features" there :)
[25 Apr 2012 8:41] Stefan Hinz
Just dawned on me that this bug should probably be assigned to *someone*. :-) Done now, and category changed because apparently this is not a docs bug.
[4 May 2012 16:09] Paul Dubois
Here is the situation:

5.0: have_profiling, have_community_features added in 5.0.82
5.1: have_community_features added in 5.1.24
5.5+: have_profiling present from 5.5.0 (have_community features renamed to have_profiling)
[4 May 2012 16:34] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Clarified that have_profiling indicates whether the profiling capability is present, and that if present, profiling enables or disables it.

Also linked to same profiling section from both variable descriptions.

Added entries for have_profiling/have_community_features in 5.0 manual.