[MDEV-13634] Optionally don't make a query fail with USE INDEX (non_existing_index) Created: 2017-08-23  Updated: 2017-08-24

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Federico Razzoli Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None


 Description   

A query like this:

SELECT ... FROM t USE INDEX (index_name) ...

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.



 Comments   
Comment by Alex/AT [ 2017-08-24 ]

Yeah, would be extremely nice. In example, with a set of replicated servers, sometimes it's worth to have some large (forced) index at read nodes but not on write/backup nodes. Voting for this.

Generated at Thu Feb 08 08:07:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.