mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fix(project): no need to process tinyint(1) specially #631
This commit is contained in:
@@ -718,8 +718,6 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
|
|||||||
isBinary = true;
|
isBinary = true;
|
||||||
} else if (StringUtils.containsIgnoreCase(fieldMeta.getColumnType(), "BINARY")) {
|
} else if (StringUtils.containsIgnoreCase(fieldMeta.getColumnType(), "BINARY")) {
|
||||||
isBinary = true;
|
isBinary = true;
|
||||||
} else if (StringUtils.containsIgnoreCase(fieldMeta.getColumnType(), "TINYINT(1)")) {
|
|
||||||
isSingleBit = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,10 +772,6 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
|
|||||||
// 对象为number类型,直接valueof即可
|
// 对象为number类型,直接valueof即可
|
||||||
columnBuilder.setValue(String.valueOf(value));
|
columnBuilder.setValue(String.valueOf(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSingleBit && javaType == Types.TINYINT) {
|
|
||||||
javaType = Types.BIT;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case Types.REAL: // float
|
case Types.REAL: // float
|
||||||
case Types.DOUBLE: // double
|
case Types.DOUBLE: // double
|
||||||
|
|||||||
Reference in New Issue
Block a user