MySQL keywords `key' not quoted as a column name

Description

if the column contains a keyword, such as "key". the migration fails.

e.g. the generated SQL DDL contains: key VARCHAR(20) NOT NULL
because there is a change set about creating a table with a column called key.

The problem is that AbstractJdbcDatabase.java uses
private Set<String> reservedWords = new HashSet<String>();
for keywords but MySQL is case insensitive. So if the column name is not of uppercase, the escaping doesn't work.

Is it better to use a case insensitive set instead?

I don't know how many databases are case sensitive though.

Environment

liquibase + MySQL

Reporter

Li He

Components

Fix versions

Affects versions

Priority

Major
Configure