Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
Description
This is a clean-up task that can be easily done after MDEV-8093.
There are two pairs of very similar rules:
- opt_if_exists vs opt_if_exists_table_element
- opt_if_not_exists vs opt_if_not_exists_table_element
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:
ALTER TABLE t1 DROP INDEX IF EXISTS f1;
|
The "opt_if_xxx" rules are based on DDL_options_st and used in a schema object context:
CREATE TABLE IF NOT EXISTS t1 (a int);
|
DROP FUNCTION IF EXISTS f1;
|
We'll modify sql_yacc.yy to use the DDL_options_st based rules in all contexts and will get rid of:
- The "opt_if_exists_table_element" rule
- The "opt_if_not_exists_table_element" rule
- The "check_exists" member in LEX.
Attachments
Issue Links
- is blocked by
-
MDEV-8093 sql_yacc.yy: add %type create_field for field_spec and column_def
- Closed
-
MDEV-14404 Don't use LEX::check_exists in ALTER SEQUENCE
- Closed