Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.2
-
None
Description
When a WITH clause is attached to the unit from CREATE ... SELECT and the unit with this clause are parenthesis then the parser returns a syntax error:
MariaDB [test]> create table my_ancestors ( with recursive ancestor_ids (id) as ( select father from folks where name = 'Me' union select mother from folks where name = 'Me' union select father from folks, ancestor_ids a where folks.id = a.id union select mother from folks, ancestor_ids a where folks.id = a.id ) select p.* from folks as p, ancestor_ids as a where p.id = a.id );
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'recursive ancestor_ids (id) as ( select father from folks where name = 'Me' ' at line 1
|