WL#3527: Extend IGNORE INDEX so places where index is ignored can be specified

Affects: Server-5.1   —   Status: Complete

Currently MySQL allows one to specify what indexes to ignore during
join optimization. The scope of the current IGNORE INDEX statement is
only the FROM clause, while all other clauses are not affected.

However, in certain cases (see BUG#21174 for an example), the optimizer
may incorrectly choose an index for sorting and/or grouping, and
produce an inefficient query plan.

TODO: This WorkLog can be extended to add the FOR {JOIN | ORDER | GROUP BY}
clause to USE INDEX and FORCE INDEX. This addition will balance the three
clauses and contribute to more consistent syntax.