magento/magento2 — pull request #133 by colinmollenhour (2012-11-16 02:03:23+00:00)
Title: Fix product collection sort order to use option sort order.

Currently when you sort a product collection by a 'select' attribute the products are sorted by the attribute option labels. This pull request changes that to sort by the attribute option sort_order field.

Note, a similar patch works on Magento 1.x (using in production, queries are fast and indexed, confirmed with EXPLAIN), but I have not tested this code with Magento 2.