[MDEV-20735] Allow non-reserved keywords as user defined type names Created: 2019-10-03  Updated: 2019-10-03  Resolved: 2019-10-03

Status: Closed
Project: MariaDB Server
Component/s: Data types
Fix Version/s: 10.5.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

This task is similar to MDEV-20734, but for non-reserved keywords.

To avoid compatibility problems in the future, let's allow non-conflicting non-reserved keywords as user defined type (UDT) names.

The non-reserved keywords from the following rules will be allowed:

non_reserved_keyword_udt:
          keyword_sp_var_not_label
        | keyword_sp_head
        | keyword_verb_clause
        | keyword_set_special_case
        | keyword_sp_block_section
        | keyword_sysvar_type
        | keyword_sp_var_and_label
        ;

Non-reserved keywords from these rules won't work as UDT names, because they'd cause grammar conflicts:

keyword_data_type:
          BIT_SYM
        | BOOLEAN_SYM
        | BOOL_SYM
        | CLOB_MARIADB_SYM
        | CLOB_ORACLE_SYM
        | DATE_SYM           %prec PREC_BELOW_CONTRACTION_TOKEN2
        | DATETIME
        | ENUM
        | FIXED_SYM
        | JSON_SYM
        | MEDIUM_SYM
        | NATIONAL_SYM
        | NCHAR_SYM
        | NUMBER_MARIADB_SYM
        | NUMBER_ORACLE_SYM
        | NVARCHAR_SYM
        | RAW_MARIADB_SYM
        | RAW_ORACLE_SYM
        | ROW_SYM
        | SERIAL_SYM
        | TEXT_SYM
        | TIMESTAMP          %prec PREC_BELOW_CONTRACTION_TOKEN2
        | TIME_SYM           %prec PREC_BELOW_CONTRACTION_TOKEN2
        | VARCHAR2_MARIADB_SYM
        | VARCHAR2_ORACLE_SYM
        | YEAR_SYM
        ;
 
 
keyword_cast_type:
          SIGNED_SYM
        ;


Generated at Thu Feb 08 09:01:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.