Bug #58875 API Docs should show #defined const values in docs
Submitted: 10 Dec 2010 19:53 Modified: 11 Mar 2013 19:57
Reporter: Jonathan Miller Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / C Documentation Severity:S4 (Feature request)
Version:ALL OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[10 Dec 2010 19:53] Jonathan Miller
Description:
Currently the docs will show return values in a mix of numeric and defined constants, but do not show what the defined constant is define too.

http://dev.mysql.com/doc/refman/5.5/en/mysql-stmt-fetch.html

Example:mysql_stmt_fetch()

Show return values as:

Return Value 	Description
0 	Successful, the data has been fetched to application data buffers.
1 	Error occurred. Error code and message can be obtained by calling  
        mysql_stmt_errno() and mysql_stmt_error().
MYSQL_NO_DATA 	        No more rows/data exists
MYSQL_DATA_TRUNCATED 	Data truncation occurred

But no where in that page does it show what "MYSQL_NO_DATA" nor "MYSQL_DATA_TRUNCATED" is defined as! (By the way 100 and 101 respectfully) 

How to repeat:
Visit http://dev.mysql.com/doc/refman/5.5/en/mysql-stmt-fetch.html

Suggested fix:
Show the actual value returned and add a new column called "Defined As" or something like that so that both are on the page.

This is just one example, but I have a feeling there are many more place in the API Docs that have the same sort of issue.
[11 Mar 2013 19:57] Paul DuBois
The point of using defined constants is so that you don't have to know the particular value.