Bug #42312 Make IGNORE index hint ignore missing index
Submitted: 23 Jan 2009 19:22 Modified: 4 Feb 2009 14:54
Reporter: Guillaume Giroux Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Parser Severity:S4 (Feature request)
Version:5.1.30 OS:Any
Assigned to: CPU Architecture:Any

[23 Jan 2009 19:22] Guillaume Giroux
Description:
Mysqld is complaining that the index to ignore doesn't exist, which doesn't make a lot of sense to me. It could be useful if for example you want to drop the index at some point in the future without changing the client applications.

How to repeat:
mysql> create table ignore_test (i int) type=innodb;
Query OK, 0 rows affected, 1 warning (0.14 sec)

mysql> select * FROM ignore_test IGNORE INDEX (FOO);
ERROR 1176 (42000): Key 'FOO' doesn't exist in table 'ignore_test'

Suggested fix:
Silently ignore missing index specified in IGNORE INDEX clause, and execute the query normally. Maybe convert the error to a warning.
[4 Feb 2009 14:54] Susanne Ebrecht
Many thanks for writing a feature request.

Verified as described.

Our development will discuss this.