mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Merge pull request #1014 from wingerx/master
修复通过`show master status`获取到多个GTID 时,回车符导致UUID 解析失败的bug
This commit is contained in:
@@ -86,7 +86,8 @@ public class MysqlGTIDSet implements GTIDSet {
|
||||
if (gtidData == null || gtidData.length() < 1) {
|
||||
m = new HashMap<String, UUIDSet>();
|
||||
} else {
|
||||
String[] uuidStrs = gtidData.split(",");
|
||||
// 存在多个GTID时会有回车符
|
||||
String[] uuidStrs = gtidData.replaceAll("\n", "").split(",");
|
||||
m = new HashMap<String, UUIDSet>(uuidStrs.length);
|
||||
for (int i = 0; i < uuidStrs.length; i++) {
|
||||
UUIDSet uuidSet = UUIDSet.parse(uuidStrs[i]);
|
||||
|
||||
Reference in New Issue
Block a user