[MDEV-16117] SP with a single FOR statement creates but further fails to load Created: 2018-05-08 Updated: 2018-09-07 Resolved: 2018-05-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.7 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
This problem was reported by Peter Gulutzan: This script creates without problems a stored procedure consisting of a single FOR statement, but an attempt to execute it fails with an error:
Querying mysql.proc tells that the body value is wrong for this procedure:
Notice, the keyword FOR is missing in the beginning. The same problem is repeatable with a stored function consisting of a single FOR statement:
It should be fixed to preserve the FOR keyword in body. |
| Comments |
| Comment by Alexander Barkov [ 2018-05-08 ] | ||||||||||||||||||||||||||||||||
|
The problem is repeatable with statements starting with any keyword that can be a part of keyword contraction in the function MYSQLlex() in sql_lex.cc:
This script demonstrates the same problem with WITH:
This script demonstrates the same problem with VALUES:
|