[MDEV-17652] Add sql_mode specific tokens for some keywords Created: 2018-11-09 Updated: 2018-11-11 Resolved: 2018-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Fix Version/s: | 10.3.11 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
The following keywords have a very different meaning in the default sql_mode and in sql_mode=ORACLE.
To unify sql_yacc.yy and sql_yacc_ora.yy easier, we'll add sql_mode specific tokens for these keywords and modify the grammar in sql_yacc.yy and sql_yacc_ora.yy accordingly. So for example, instead of BEGIN_SYM, we'll have separate BEGIN_MARIADB_SYM and BEGIN_ORACLE_SYM. This will make it possible for native and Oracle grammar rules to co-exists in the same *.yy files. By default, Lex_input_stream::find_keyword() will return the _MARIADB_SYM versions of the keywords, and translate them to _ORACLE_SYM on Oracle compatibility mode, e.g. like this:
|