[MDEV-7792] SQL Parsing Error - UNION AND ORDER BY WITH JOIN Created: 2015-03-17 Updated: 2015-06-29 Resolved: 2015-06-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1.3 |
| Fix Version/s: | 10.1.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | m.rygiel | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | verified | ||
| Environment: |
centos 6 |
||
| Sprint: | 10.1.6-1 |
| Description |
|
This test case is not working on MariaDB 10.1.3:
Same query on clean Mysql 5.6 working with no problems. |
| Comments |
| Comment by Elena Stepanova [ 2015-03-17 ] | ||||||||||
|
Thanks for the report and the test case. The problem appeared along with UNION ALL optimization:
The same test case works all right on the current 5.7 tree. | ||||||||||
| Comment by Igor Babaev [ 2015-04-07 ] | ||||||||||
|
Some time ago we removed ORDER BY from any subqueries. | ||||||||||
| Comment by Sergey Vojtovich [ 2015-06-24 ] | ||||||||||
|
serg, please review fix for this bug. Note that I'm completely unsure about correctness of this fix, since it was done with assumption that the purpose of context change was intended for the duration of gathering field list for ORDER BY. Or was it intended to be changed for different duration? In this case should we rather pop_context()? | ||||||||||
| Comment by Oleksandr Byelkin [ 2015-06-25 ] | ||||||||||
|
CREATE TABLE t1 ( INSERT INTO t1 VALUES ( 2 ); SELECT * DROP TABLE t1; | ||||||||||
| Comment by Sergey Vojtovich [ 2015-06-25 ] | ||||||||||
|
The statement you're referring to was fixed in MySQL revision 5948561, which is worthy, but doesn't directly relate to this bug. |