mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed DatabaseTableMeta#compareTableMeta
This commit is contained in:
@@ -502,11 +502,13 @@ public class DatabaseTableMeta implements TableMetaTSDB {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String sign = sourceField.isUnsigned() ? "unsigned" : "signed";
|
||||||
|
String sourceColumnType = StringUtils.removeEndIgnoreCase(sourceField.getColumnType(), sign).trim();
|
||||||
|
String targetColumnType = StringUtils.removeEndIgnoreCase(targetField.getColumnType(), sign).trim();
|
||||||
|
|
||||||
boolean columnTypeCompare = false;
|
boolean columnTypeCompare = false;
|
||||||
columnTypeCompare |= StringUtils.containsIgnoreCase(sourceField.getColumnType(),
|
columnTypeCompare |= StringUtils.containsIgnoreCase(sourceColumnType, targetColumnType);
|
||||||
targetField.getColumnType());
|
columnTypeCompare |= StringUtils.containsIgnoreCase(targetColumnType, sourceColumnType);
|
||||||
columnTypeCompare |= StringUtils.containsIgnoreCase(targetField.getColumnType(),
|
|
||||||
sourceField.getColumnType());
|
|
||||||
if (!columnTypeCompare) {
|
if (!columnTypeCompare) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user