[MDEV-8343] Support table function declarations in the parser Created: 2015-06-19 Updated: 2015-06-27 Resolved: 2015-06-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This is a part of dj's GSoC project. Make the parser support
This is just about supporting it in the parser. The statement should
|
| Comments |
| Comment by diwas joshi [ 2015-06-21 ] | |||||||||||||
|
This task required making some changes under sf_tail in sql_yacc, which has been done. Currently the input is parsing successfully and parser is returning ER_NOT_SUPPORTED_YET error for now, which will be removed later. | |||||||||||||
| Comment by Sergei Petrunia [ 2015-06-23 ] | |||||||||||||
|
Ok I have tried and at least one example works:
(the error text is bad but it doesnt matter because the error will be removed anyway) | |||||||||||||
| Comment by Sergei Petrunia [ 2015-06-23 ] | |||||||||||||
|
I am looking at the part of changes3.diff that relates to this MDEV, and I am seeing this change; type_with_opt_collate was:
and now it is
You did it, because sf_tail rule refers to type_with_opt_collate. This is reasonable, sf_tail is used for handling CREATE FUNCTION syntax, and we want to change the grammar there. However, type_with_opt_collate is also used in other rules:
As far as I understand, these are used for declaring SP parameters and for variable declarations inside stored procedures. That is, your patch also enables things like: CREATE PROCEDURE f1 (IN col1 TABLE foo (c2 INT)) BEGIN RETURN '123'; end ; | which we don't want. Please change the grammar to not allow anything extra. | |||||||||||||
| Comment by Sergei Petrunia [ 2015-06-23 ] | |||||||||||||
|
Please also
| |||||||||||||
| Comment by Sergei Petrunia [ 2015-06-27 ] | |||||||||||||
|
Patch pushed into dj's tree. Marking as closed |