Bug #78234 docs for DBUG_EVALUATE_IF are incorrect
Submitted: 26 Aug 2015 20:46 Modified: 9 Dec 2015 17:43
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[26 Aug 2015 20:46] Mark Callaghan
Description:
I think this has describes the return values (val1, val2) backwards. It states:

"DBUG_EVALUATE_IF (keyword, val1, val2) is used in "if" expressions and returns "val2" if the appropriate dbug instruction is set. Otherwise, it returns "val1". In this case, the dbug instruction should be +d,keyword. "

I think it should state:

DBUG_EVALUATE_IF (keyword, val1, val2) is used in "if" expressions and returns "val1" if the appropriate dbug instruction is set. Otherwise, it returns "val2". In this case, the dbug instruction should be +d,keyword. 

https://dev.mysql.com/doc/internals/en/test-faults-macros.html

How to repeat:
see how DBUG_EVALUATE_IF is used in source code

Suggested fix:
fix the text as described
[27 Aug 2015 5:42] MySQL Verification Team
Hello Mark,

Thank you for the report.

Thanks,
Umesh
[9 Dec 2015 17:43] 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.