[MDEV-15159] NULL is treated as 0 in CTE Created: 2018-02-01 Updated: 2018-06-18 Resolved: 2018-05-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - CTE |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alice Sherepa | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
testcase:
it produces an infinite loop, so will get (max_recursive_iterations) strings with 0 (plus 1 sting with 1)
|
| Comments |
| Comment by Igor Babaev [ 2018-02-05 ] | |||||||||||
|
Alice,
| |||||||||||
| Comment by Alice Sherepa [ 2018-02-06 ] | |||||||||||
|
Igor, please reconsider this case. Comparing to SQL Server: "All columns returned by the recursive CTE are nullable regardless of the nullability of the columns returned by the participating SELECT statements." The same behavior is implemented in Mysql 8.0
| |||||||||||
| Comment by Igor Babaev [ 2018-05-15 ] | |||||||||||
|
This bug cannot be reproduced in 10.2 anymore due to a changed rule of type aggregations in recursive units. (BTW this rule is not in line with SQL standard). | |||||||||||
| Comment by Igor Babaev [ 2018-05-15 ] | |||||||||||
|
A fix for this bug was pushed into 10.3 |