[MDEV-8094] sql_yacc.yy: get rid of the rules "opt_if_not_exists_table_element" and "opt_if_exists_table_element" Created: 2015-05-04 Updated: 2021-05-11 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Alexander Barkov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | duplicate-code | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | Data type cleanups | ||||||||||||
| Description |
|
This is a clean-up task that can be easily done after There are two pairs of very similar rules:
which all handle IF EXISTS and IF NOT EXISTS clauses. The "opt_if_xxx_table_element" rules use Lex->check_exists as a storage and are used in column and key context of ALTER TABLE:
The "opt_if_xxx" rules are based on DDL_options_st and used in a schema object context:
We'll modify sql_yacc.yy to use the DDL_options_st based rules in all contexts and will get rid of:
|