[MDEV-13067] Statement delimiters within executable comments throw ERROR 1064 Created: 2017-06-13 Updated: 2017-07-03 Resolved: 2017-07-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Parser |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.1.24, 10.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Rich Theobald | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Environment: |
Ubuntu 14.04 |
||
| Description |
|
Example
Regular comments work fine:
|
| Comments |
| Comment by Elena Stepanova [ 2017-06-25 ] |
|
It has always been so, in MySQL and MariaDB. There are two sides in it – client and server. The client simply splits the line when it encounters the delimiter as it always does; to avoid it you need to change the delimiter. For the server, it's not really obvious from the MySQL manual whether it should work or not, it says "MySQL Server parses and executes the code within the comment as it would any other SQL statement" – it does not say there can be multiple statements. MariaDB documentation is even more obscure about it. Assigning to serg first to decide whether we want to do anything about it in the code; if not, it should end up in documentation. |
| Comment by Sergei Golubchik [ 2017-06-30 ] |
|
It's a documentation bug. |
| Comment by Ian Gilfillan [ 2017-07-03 ] |
|
Specified in the docs, with example: |