[MDEV-11259] Recursive CTE crashes or gets "table full" errors Created: 2016-11-09 Updated: 2016-11-17 Resolved: 2016-11-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - CTE |
| Affects Version/s: | 10.2.2 |
| Fix Version/s: | 10.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | richardeaxon | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos 7 |
||
| Description |
|
Using the following simple table and dataset from the extensive CTE examples here: https://inviqa.com/blog/graphs-database-sql-meets-social-network
When trying any of the examples the server either crashes hard, or the query runs but aborts with ERROR 1114 (HY000): The table '/tmp/#sql_4b24_1' is full. Some of the queries I ran are: Causes a "table full":
Causes a hard server crash (suspect due to CTE against view):
I expect all the queries to behave as per the examples given in the article. |
| Comments |
| Comment by Elena Stepanova [ 2016-11-12 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report and test case. The crashes were fixed in scope of | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2016-11-12 ] | |||||||||||||||||||||||||||||||||||||||||||
|
The problem is that MySQL/MariaDB does not take the operator '||' as the concatenation operator.
and
Yes, MySQL/MariaDB does not follow SQL standard here, but this is a different problem. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by richardeaxon [ 2016-11-13 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Reworking query 1 & 2 as follows gives the expected result. As the crash caused by query 3 & 4 has been resolved under another ticket, this ticket can be closed. Thanks.
| |||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2016-11-17 ] | |||||||||||||||||||||||||||||||||||||||||||
|
The test case from this mdev was added into cte_recursive.test |