从 3.4 到 3.5,Liquibase 与 utf8 的行为不同吗?

Liquibase behaves different with utf8 from 3.4 to 3.5?

我们有 utf8 sql 文件并使用 liquibase。我正在从头开始设置 liquibase,但 mysql.

的 utf8 编码 sql 文件有问题

我设置了从 env 变量到 mysql 连接字符串的所有内容以保证使用 utf8 编码,但没有任何效果。我尝试过的技巧:像 file.encoding 这样设置环境,将 utf8 设置到 mysql 连接的连接字符串中,设置数据库、客户端和服务器的编码。

有效的方法是从 Liquibase 3.5.1 切换到 3.4.2。

是否改变了行为或者 Liquibase 3.5.1 是否有关于如何正确处理 utf8 文件的 new/different 行为?

当我使用 3.5.1 而不是 3.4.2 时的示例错误消息(没有其他不同): "Unexpected error running Liquibase: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO " ...

@sigi 我可能从 3.5.0 (3.5.1) 版开始遇到了同样的问题

token错误提示必须配合3.5版本新增的词法分析

https://liquibase.jira.com/projects/CORE/issues/CORE-2843

已在版本 3.5.2 中修复

SimpleSqlGrammer.jj
S_CHAR_LITERAL didn't support the escaped single quote within a string literal \'

快速解决方法是用两个引号 '' 替换转义的单引号 \' 这在 MySQL 字符串文字