[MDEV-6768] Wrong result with aggregate with join with no result set Created: 2014-09-23 Updated: 2023-09-01 Resolved: 2023-05-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5.39, 10.0.14, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Marc T. | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 11.0-sel, upstream | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Hi, I reported a bug on MySQL and MariaDB 5.5.39 is affected. http://bugs.mysql.com/bug.php?id=73946 >> In the test-case bellow, PARENT_ID must be null, not "1" Test case :
|
| Comments |
| Comment by Elena Stepanova [ 2014-09-24 ] | |||||||||||||||||||
|
Marc The problem is reproducible on InnoDB tables, but not on MyISAM! If you put the provided test case into MTR, make sure it uses InnoDB for the tables. | |||||||||||||||||||
| Comment by Alice Sherepa [ 2022-11-24 ] | |||||||||||||||||||
|
| |||||||||||||||||||
| Comment by Michael Widenius [ 2023-03-31 ] | |||||||||||||||||||
|
The problem here is that item->no_rows_in_result() does not work for Item_field.
| |||||||||||||||||||
| Comment by Michael Widenius [ 2023-05-02 ] | |||||||||||||||||||
|
Backporting patch from 10.5 to 10.4 | |||||||||||||||||||
| Comment by Michael Widenius [ 2023-05-03 ] | |||||||||||||||||||
|
When a query does implicit grouping and join operation produces an empty What happens in the is that end_send_group() is called with a This causes item->no_rows_in_result() to be called for all items to reset The used fix is to produce NULL-complemented records for constant tables | |||||||||||||||||||
| Comment by Marc T. [ 2023-05-03 ] | |||||||||||||||||||
|
Many thanks |