mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
1、adapter/rdb,从库表字段(varchar,char,text,longtext)非空约束时,无法同步问题修正
2、主库存在0000-00-00 00:00:00时间时,从库表字段是非空约束时,无法同步问题修正
This commit is contained in:
@@ -200,7 +200,7 @@ public class SyncUtil {
|
||||
DateTime dt = new DateTime(v);
|
||||
pstmt.setDate(i, new Date(dt.toDate().getTime()));
|
||||
} else {
|
||||
pstmt.setNull(i, type);
|
||||
pstmt.setObject(i, value);
|
||||
}
|
||||
} else {
|
||||
pstmt.setNull(i, type);
|
||||
@@ -232,7 +232,7 @@ public class SyncUtil {
|
||||
DateTime dt = new DateTime(v);
|
||||
pstmt.setTimestamp(i, new Timestamp(dt.toDate().getTime()));
|
||||
} else {
|
||||
pstmt.setNull(i, type);
|
||||
pstmt.setObject(i, value);
|
||||
}
|
||||
} else {
|
||||
pstmt.setNull(i, type);
|
||||
|
||||
Reference in New Issue
Block a user