mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
数据库名称如何存在中划线"-"情况下,SQL执行异常 (#3228)
Co-authored-by: liguowang <liguowang@aerozhonghaun.com>
This commit is contained in:
@@ -262,9 +262,9 @@ public class SyncUtil {
|
|||||||
public static String getDbTableName(MappingConfig.DbMapping dbMapping) {
|
public static String getDbTableName(MappingConfig.DbMapping dbMapping) {
|
||||||
String result = "";
|
String result = "";
|
||||||
if (StringUtils.isNotEmpty(dbMapping.getTargetDb())) {
|
if (StringUtils.isNotEmpty(dbMapping.getTargetDb())) {
|
||||||
result += dbMapping.getTargetDb() + ".";
|
result += ("`" + dbMapping.getTargetDb() + "`.");
|
||||||
}
|
}
|
||||||
result += dbMapping.getTargetTable();
|
result += ("`" + dbMapping.getTargetTable() + "`");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user