From 028e2848b32984eb770bd23c9636a02fdb8ef215 Mon Sep 17 00:00:00 2001 From: Vadzim Ramanenka Date: Mon, 15 Jul 2024 10:13:58 +0200 Subject: [PATCH] CXP-3245: Allow `yes` keyword to be used as an identifier --- .../io/debezium/ddl/parser/mysql/generated/MySqlParser.g4 | 2 +- .../src/test/resources/mysql/examples/ddl_alter.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debezium-ddl-parser/src/main/antlr4/io/debezium/ddl/parser/mysql/generated/MySqlParser.g4 b/debezium-ddl-parser/src/main/antlr4/io/debezium/ddl/parser/mysql/generated/MySqlParser.g4 index 3f47b6b0390..300442f0e10 100644 --- a/debezium-ddl-parser/src/main/antlr4/io/debezium/ddl/parser/mysql/generated/MySqlParser.g4 +++ b/debezium-ddl-parser/src/main/antlr4/io/debezium/ddl/parser/mysql/generated/MySqlParser.g4 @@ -2855,7 +2855,7 @@ keywordsCanBeId | THAN | TP_CONNECTION_ADMIN | TRADITIONAL | TRANSACTION | TRANSACTIONAL | TRIGGERS | TRUNCATE | UNBOUNDED | UNDEFINED | UNDOFILE | UNDO_BUFFER_SIZE | UNINSTALL | UNKNOWN | UNTIL | UPGRADE | USA | USER | USE_FRM | USER_RESOURCES | VALIDATION | VALUE | VAR_POP | VAR_SAMP | VARIABLES | VARIANCE | VERSIONING | VERSION_TOKEN_ADMIN | VIEW | VIRTUAL | WAIT | WARNINGS - | WITHOUT | WORK | WRAPPER | X509 | XA | XA_RECOVER_ADMIN | XML + | WITHOUT | WORK | WRAPPER | X509 | XA | XA_RECOVER_ADMIN | XML | YES // MariaDB-specific only | BINLOG_MONITOR | BINLOG_REPLAY | CURRENT_ROLE | CYCLE | ENCRYPTED | ENCRYPTION_KEY_ID | FEDERATED_ADMIN | INCREMENT | LASTVAL | LOCKED | MAXVALUE | MINVALUE | NEXTVAL | NOCACHE | NOCYCLE | NOMAXVALUE | NOMINVALUE diff --git a/debezium-ddl-parser/src/test/resources/mysql/examples/ddl_alter.sql b/debezium-ddl-parser/src/test/resources/mysql/examples/ddl_alter.sql index 5da29239965..59abf05cca1 100644 --- a/debezium-ddl-parser/src/test/resources/mysql/examples/ddl_alter.sql +++ b/debezium-ddl-parser/src/test/resources/mysql/examples/ddl_alter.sql @@ -40,6 +40,7 @@ alter table add_test modify column if exists col5 varchar(255); alter table add_test drop column if exists col99; alter table add_test drop column if exists col5; alter table add_test add column optional bool default 0 null; +alter table add_test add column yes varchar(255) default '' null; alter table add_test add column empty varchar(255); alter table add_test add column geometry int; alter table add_test drop foreign key fk;