Bug #115397 statement_id variable has minimal documentation

Submitted: 20 Jun 2024 18:29 Modified: 16 Jul 2024 13:03
Reporter: Dov Endress Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0.33 and above OS:Any
Assigned to: CPU Architecture:Any

[20 Jun 2024 18:29] Dov Endress
Description:
The variable statement_id is only found in the documentation as part of the description of session_track_system_variables. 

"To enable display of the Statement ID for each statement processed, use the statement_id variable. For example:

mysql>  SET @@SESSION.session_track_system_variables='statement_id'
mysql>  SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.0006 sec)
Statement ID: 603835
"

I don't know if this is an oversight or if the variable and its usage is considered self-explanatory and does not merit an individual listing within the other system variables. It is clearly a read only variable and perhaps it should be documented more fully.

How to repeat:
refer to https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_session_track_... for the only reference to statement_id as a variable and not as a field in the performance_schema.prepared_statements_instances table.

Suggested fix:
I cannot really say this variable demands its own listing with the rest of the sys vars. It caused me a bit of confusion at first looking for it, but I quickly realized its use. I leave it up to you to decide if it should be more fully documented as a variable. For what it is worth other read-only variables are documented: e.g. build_id, ngram_token_size, etc.

Cheers!

Dov Endress
[21 Jun 2024 6:33] MySQL Verification Team
Hello Dov Endress,

Thank you for the document enhancement request and feedback.

regards,
Umesh
[16 Jul 2024 13:03] Jon Stephens
Fixed in mysqldoc rev 79048.

Closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.