[MDEV-486] LP:1010116 - Incorrect query results in subqueries Created: 2012-08-24 Updated: 2012-12-04 Resolved: 2012-09-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.25, 5.3.7 |
| Fix Version/s: | 5.5.27, 5.3.9 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||
| Description |
|
https://bugs.launchpad.net/maria/+bug/1010116 Test case 1 (with default optimizer_switch):
Expected result:
Actual result:
Reproducible on maria/5.3 revno 3562, maria/5.5 revno 3508 Test case 2
Expected result:
Actual result:
Reproducible on maria/5.2, maria/5.3, maria/5.5, mysql/5.1, mysql/5.5, mysql/5.6 |
| Comments |
| Comment by Oleksandr Byelkin [ 2012-08-28 ] |
|
explain extended shows why result is incorrect (see constants in the select list in transformed query): Note 1003 select 30631 AS `id`,1 AS `Val1` from (select 30631 AS `id`) `Derived1` left join ((select 30631 AS `id`) `Derived3`) on(0) where 1 |
| Comment by Oleksandr Byelkin [ 2012-08-28 ] |
|
substitution made during preparation (setup_fields). |
| Comment by Oleksandr Byelkin [ 2012-08-30 ] |
|
Problem can be even expression over table fields (not only constants): drop view v2; |
| Comment by Oleksandr Byelkin [ 2012-08-30 ] |
|
View variant also repeatable on 5.6 (probably earlier also). |
| Comment by Sergei Golubchik [ 2012-08-31 ] |
|
repeatable on mysql-5.5 too |
| Comment by Oleksandr Byelkin [ 2012-09-04 ] |
|
Patch committed, waiting for review... |
| Comment by Sergei Golubchik [ 2012-09-06 ] |
|
pushed in 5.5 |