← Back to team overview

maria-developers team mailing list archive

Re: feedback on proposed fix to MySQL bug 57430



Will this fix also solve the bug http://bugs.mysql.com/bug.php?id=36817 (and reopened in maria as https://bugs.launchpad.net/maria/+bug/639949 ) ?

Thanks and regards,
  Jocelyn Fournier

Le 19/05/2011 16:46, Michael Widenius a écrit :

"Zardosht" == Zardosht Kasheff<zardosht@xxxxxxxxx>  writes:
Zardosht>  The issue that I see with this proposal is that if quick_records is
Zardosht>  much much greater than best_records, then we may not want to set
Zardosht>  best_key to nr even though this nr is a covering index.

Agree, but this is what is happening with covering indexes anyway if
they where found before a normal index.

This comes from the code a bit higher up:

             if ((is_best_covering&&  !is_covering) ||
                 (is_covering&&  ref_key_quick_rows<  select_limit))

The first part of this test means that as soon as we have found a
covering index, all other index are disregarded.
My change fixes things so that all clustered indexes are treated
equal, in spite of their position among the keys.

The right way to fix this is to calculate the cost of the index and
remove the testing of number of key parts and covering keys.

I will look at this as soon as all my other 5.3 tasks are done.
(ETA: 1-2 weeks)


Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp