MySQL syntax error is thrown if schema name contains hyphens

Description

Invalid SQL is generated for MySQL if the schema name contains at least one hyphen:

The schema name needs to be surrounded by back-ticks:

I've attached a demo:

  1. create database `db-test`

  2. grant all privileges on `db-test`.* to `db-test`@localhost identified by 'db-test'

  3. ./run.sh

This used to work with liquibase 2.0.5.

Environment

Ubuntu 13.04, MySQL 5.5.31, Java 1.7.0_25

Reporter

Thomas Hammerl

Fix versions

Affects versions

Priority

Major
Configure