mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #507
This commit is contained in:
@@ -443,11 +443,10 @@ public class DatabaseTableMeta implements TableMetaTSDB {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourceField.isKey() != targetField.isKey()) {
|
// mysql会有一种处理,针对show create只有uk没有pk时,会在desc默认将uk当做pk
|
||||||
return false;
|
boolean isSourcePkOrUk = sourceField.isKey() || sourceField.isUnique();
|
||||||
}
|
boolean isTargetPkOrUk = targetField.isKey() || targetField.isUnique();
|
||||||
|
if (isSourcePkOrUk != isTargetPkOrUk) {
|
||||||
if (sourceField.isUnique() != targetField.isUnique()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user