[MDEV-24925] Server crashes in Item_subselect::init_expr_cache_tracker Created: 2021-02-19 Updated: 2021-06-30 Resolved: 2021-04-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.2.38, 10.3.29, 10.4.19, 10.5.10, 10.6.1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Reproducible on debug and non-debug builds alike.
Other versions are not affected so far, since the patch hasn't been merged up yet. Likely to be related to |
| Comments |
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
Formatted query:
The crash happens when we try to create an expression cache Looking why this is so, I see that the subquery is "eliminated" by this
which removes the subquery's select from the SELECT_LEX tree and sets | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
The removal of the subquery seems to be the wrong thing to do. If I work around the subquery cache initialization problem, the execution will
| ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
Apparently the same Item_singlerow_subselect is precent in the select list and
How can one distinguish between the cases like select ... from ... group by (subquery ) and select (subquery) as f ... from ... grouop by f | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
http://lists.askmonty.org/pipermail/commits/2021-April/014571.html | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
bb-10.3-mdev24925 | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
Sanja, please review | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-23 ] | ||||||||||||||||||||||
|
The fix also fixes | ||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-04-23 ] | ||||||||||||||||||||||
|
OK to push | ||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-04-26 ] | ||||||||||||||||||||||
|
Cherry-picked the fix to 10.2 |