mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-04 06:10:09 +08:00
fix: bit type Data truncation for oceanbase bug #1256
This commit is contained in:
parent
6980d89883
commit
91ea278762
@ -530,7 +530,7 @@ public class CommonRdbmsWriter {
|
|||||||
// warn: bit(1) -> Types.BIT 可使用setBoolean
|
// warn: bit(1) -> Types.BIT 可使用setBoolean
|
||||||
// warn: bit(>1) -> Types.VARBINARY 可使用setBytes
|
// warn: bit(>1) -> Types.VARBINARY 可使用setBytes
|
||||||
case Types.BIT:
|
case Types.BIT:
|
||||||
if (this.dataBaseType == DataBaseType.MySql) {
|
if (this.dataBaseType == DataBaseType.MySql || this.dataBaseType == DataBaseType.OceanBase) {
|
||||||
preparedStatement.setBoolean(columnIndex + 1, column.asBoolean());
|
preparedStatement.setBoolean(columnIndex + 1, column.asBoolean());
|
||||||
} else {
|
} else {
|
||||||
preparedStatement.setString(columnIndex + 1, column.asString());
|
preparedStatement.setString(columnIndex + 1, column.asString());
|
||||||
|
Loading…
Reference in New Issue
Block a user