Closed c80609a closed 7 years ago
UNION is a set operation, so I'm not surprised that order isn't guaranteed.
Note that your different result orders could be because of a different query plan rather than a different database version--that is, on a larger dataset MySQL might use a different method to remove duplicates.
It's not a gem bug, just a quick important note:
My development server (MySQL Ver 14.14 Distrib 5.6.17). But when I run the same code on production (mysql Ver 15.1 Distrib 5.5.47-MariaDB), I consistently get different results (different records order).