[MDEV-15157] Infinite recursive loop in CTE Created: 2018-02-01 Updated: 2018-02-09 Resolved: 2018-02-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - CTE |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Alice Sherepa | Assignee: | Alice Sherepa |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
testcase:
Should probably be an error, that in anchor part table cte is not used |
| Comments |
| Comment by Alice Sherepa [ 2018-02-01 ] | ||||||
|
here should probably be another error message.
| ||||||
| Comment by Igor Babaev [ 2018-02-05 ] | ||||||
|
Alice, | ||||||
| Comment by Alice Sherepa [ 2018-02-06 ] | ||||||
|
Sorry for a not clear explanation, what I meant and being misleading with a comment, I wanted to indicate different problems, but reported them in the same bug.
And if the type of CTE is determined only by the type of anchor parts, what type should be in this case then.
If recursive part returns const and we have union all in the query, then it results in infinite loop | ||||||
| Comment by Igor Babaev [ 2018-02-09 ] | ||||||
|
Alice,
The anchor (non-recursive part of the union is SELECT 1. It's type is int(11). | ||||||
| Comment by Igor Babaev [ 2018-02-09 ] | ||||||
|
See my comments. |