数据库名称如何存在中划线"-"情况下,SQL执行异常 (#3228)

Co-authored-by: liguowang <liguowang@aerozhonghaun.com>
This commit is contained in:
ljcoder
2020-12-31 11:33:01 +08:00
committed by GitHub
parent d741425895
commit 8cfb07f07e

View File

@@ -262,9 +262,9 @@ public class SyncUtil {
public static String getDbTableName(MappingConfig.DbMapping dbMapping) {
String result = "";
if (StringUtils.isNotEmpty(dbMapping.getTargetDb())) {
result += dbMapping.getTargetDb() + ".";
result += ("`" + dbMapping.getTargetDb() + "`.");
}
result += dbMapping.getTargetTable();
result += ("`" + dbMapping.getTargetTable() + "`");
return result;
}
}