[MDEV-19087] RETURN can't be used right after BEGIN Created: 2019-03-29 Updated: 2019-03-29 Resolved: 2019-03-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Procedure, PL/SQL, Stored routines |
| Affects Version/s: | 10.1.38 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In a stored function, RETURN can't be used right after BEGIN. For example, this fails:
With the non-sensical "empty string" error message:
https://mariadb.com/kb/en/library/basic-sql-debugging/#interpreting-the-empty-error But it works just fine if you remove the BEGIN/END. For example:
|
| Comments |
| Comment by Elena Stepanova [ 2019-03-29 ] | |||||||||||
|
It is not BEGIN/RETURN problem. You're using a wrong delimiter after RETURN, it should be
| |||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-03-29 ] | |||||||||||
|
Ah, that makes sense. I expected it was user error in some way. Thanks! |