Bug #80963 Please define the optimizer hints grammar
Submitted: 5 Apr 2016 16:26 Modified: 11 May 2016 9:44
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: grammar, hint, Optimizer

[5 Apr 2016 16:26] Simon Mudd
Description:
https://dev.mysql.com/doc/refman/5.7/en/optimizer-hints.html provides information on the new optimizer query hinting infrastructure and ways to tell MySQL to adjust the behaviour of how it executes a query.

How to repeat:
Read the url above.

Suggested fix:
The information given provides quite a good context to what's needed but it's likely that over time this will evolve and the grammar used in the comment is not defined explicitly at the moment. That leads to the possibility that it may not be consistent or that it may be extended inconsistently as code changes and MySQL evolves.

For people who may want to inject the hints into their own queries for a variety of reasons having the grammar specified explicitly means we can be sure that our hinting is correct and will not break due to ambiguities and changes in the server code. 

So it's good for us and it's good for MySQL to specify this. I don't think this requires much effort but I do think it would be a good thing to do if you can.
[11 May 2016 9:44] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh