The ORDER BY clause on the final SELECT of the following script does not work:

<blockquote><verbatim>
CREATE TABLE t1(a, b, PRIMARY KEY(a,b));
INSERT INTO t1 VALUES(1,1),(1,2);
CREATE TABLE t2(x, y, PRIMARY KEY(x,y));
INSERT INTO t2 VALUES(3,3),(4,4);
SELECT a, x FROM t1, t2 ORDER BY 1, 2;


This script is a reduction of the same bug that causes the problem
in the initial bug report above.

This problem was introduced to trunk by check-in [956e4d7f8958e706] on
2012-10-03 and first appeared in release 3.7.15.