Hi Elena, I've made a patch that fixes both BUG#992942 and MDEV-325. It is rather risky, as it touches the part of the code whose interaction with other parts of the code is not very well defined. This is why I request RQG testing. Could you please run some test that would use ORDER BY ... LIMIT, GROUP BY, subqueries, tables that may or may not be read with range/index_merge access, index condition pushdown, etc? (Yes, you may really need all of the above to trigger the problem. Check out analysis comments in the bug). The code is at: bzr+ssh://bazaar.launchpad.net/~maria-captains/maria/5.5-show-explain-test1 it is based on 5.5-show-explain, so SHOW EXPLAIN part can be tested, too. BR Sergei -- Sergei Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog