DBZ-8092: No viable alternative at input "add COLUMN yes"

MySQL permits `yes` keyword to be used as an identifier.
This commit is contained in:
Vadzim Ramanenka 2024-07-15 10:13:58 +02:00 committed by Chris Cranford
parent d1f1792b69
commit 2851beadf5
4 changed files with 4 additions and 1 deletions

View File

@ -3203,6 +3203,7 @@ keywordsCanBeId
| XA
| XA_RECOVER_ADMIN
| XML
| YES
// MariaDB-specific only
| BINLOG_MONITOR
| BINLOG_REPLAY

View File

@ -2856,7 +2856,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

View File

@ -25,6 +25,7 @@ alter table table1 add primary key (id);
alter table table1 add primary key table_pk (id);
alter table table1 add primary key `table_pk` (id);
alter table table1 add primary key `table_pk` (`id`);
alter table table1 add column yes varchar(255) default '' null;
alter table add_test add column if not exists col1 varchar(255);
alter table add_test add column if not exists col4 varchar(255);
alter table add_test add index if not exists ix_add_test_col1 using btree (col1) comment 'test index';

View File

@ -25,6 +25,7 @@ alter table table1 add primary key (id);
alter table table1 add primary key table_pk (id);
alter table table1 add primary key `table_pk` (id);
alter table table1 add primary key `table_pk` (`id`);
alter table table1 add column yes varchar(255) default '' null;
alter table add_test add column if not exists col1 varchar(255);
alter table add_test add column if not exists col4 varchar(255);
alter table add_test add index if not exists ix_add_test_col1 using btree (col1) comment 'test index';