Bug #87925 Optionally don't make a query fail with USE INDEX (non_existing_index)
Submitted: 30 Sep 2017 17:27
Reporter: Federico Razzoli (OCA) Email Updates:
Status: Open Impact on me:
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[30 Sep 2017 17:27] Federico Razzoli
A query like this:


will fail with an error if specified index does not exist. This seems to me the best behaviour in test environment, but dangerous in production.

Think about this case: my db is used in production, at some point I remove an index which seems useless, and suddenly some queries fail.

So what I'm asking (unless you have better ideas to solve this problem) is having a new system variable which determines if queries like this should fail with an error, or just produce a warning.

How to repeat:
SELECT * FROM information_schema.TABLES USE INDEX (not_existing_index);