Bug #3118 | Subquery and order by | ||
---|---|---|---|
Submitted: | 9 Mar 2004 8:43 | Modified: | 17 Mar 2004 7:26 |
Reporter: | Donny Simonton | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1 | OS: | Linux (Linux) |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[9 Mar 2004 8:43]
Donny Simonton
[10 Mar 2004 7:57]
Dean Ellis
Verified against 4.1.2. Thank you. CREATE TABLE test ( a int, b int, INDEX (a,b) ); INSERT INTO test VALUES (1,1),(1,2),(1,3); SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY a; SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY b; ALTER TABLE test DROP KEY a, ADD KEY (a); SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY a; SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY b; ALTER TABLE test DROP KEY a; SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY a; SELECT * FROM test WHERE a = ( SELECT MAX(a) FROM test WHERE a = 1 ) ORDER BY b; DROP TABLE test;
[16 Mar 2004 4:33]
Ramil Kalimullin
ChangeSet 1.1779 04/03/16 16:28:50 ram@gw.mysql.r18.ru +4 -0 Fix for the bug #3118: Subquery and order by
[17 Mar 2004 7:26]
Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html