[MDEV-10312] Some reserved keywords (like OPTION) are not enforced Created: 2016-06-30 Updated: 2016-06-30 Resolved: 2016-06-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.1 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Joffrey MICHAIE (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, some reserved keywords from https://mariadb.com/kb/en/mariadb/reserved-words/ don't seem to be enforced. Following query works in MariaDB:
... and fails in MySQL (5.6 tested):
This can cause compatibility problems (ex: I develop on MariaDB, and production is on MySQL) List of reserved keywords that are not enforced:
Thanks in advance, |
| Comments |
| Comment by Sergei Golubchik [ 2016-06-30 ] |
|
The logic is — only keywords that are required by the grammar to be reserved are reserved. Reserving keywords unnecessary means adding arbitrary limitations to the grammar, and is considered a bug, we don't do that. If MySQL reserves some keywords unnecessary, you can report a bug at bugs.mysql.com and they might unreserve them. |
| Comment by Joffrey MICHAIE (Inactive) [ 2016-06-30 ] |
|
Hi Sergei and thanks for your comment. MariaDB is supposed to be a fork of MySQL, and OPTION is reserved since MySQL 4.0 or earlier. Joffrey |
| Comment by Sergei Golubchik [ 2016-06-30 ] |
|
Yes, but reserving a keyword unnecessary is a bug, and we've fixed it. MariaDB does not offer bug compatibility with MySQL, we fix bugs that MySQL doesn't. We also add features that MySQL doesn't — for example, CREATE ROLE works in MariaDB but fails in MySQL. Only MySQL can provide perfect 1:1 compatibility with MySQL. And not even any MySQL, MariaDB is often more compatible with MySQL version X.Y, than MySQL version X.(Y+1). |