diff --git a/pkg/common/table_info_shared_schema_guard_test.go b/pkg/common/table_info_shared_schema_guard_test.go index 4fbbc859e2..a9c8dd6772 100644 --- a/pkg/common/table_info_shared_schema_guard_test.go +++ b/pkg/common/table_info_shared_schema_guard_test.go @@ -125,12 +125,7 @@ func TestLatestTiDBTableInfoSharedSchemaGuard(t *testing.T) { modulePath: "github.com/pingcap/tidb/pkg/parser", pkgRelativePath: "types", typeName: "FieldType", - expectedFields: []string{ - "tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array", - // Geometry subtype is preserved by FieldType JSON and compared by Equal, - // so shared-schema equality separates it even when schema hashes collide. - "subtype", - }, + expectedFields: []string{"tp", "flag", "flen", "decimal", "charset", "collate", "elems", "elemsIsBinaryLit", "array", "subtype"}, }, } diff --git a/pkg/sink/codec/canal/helper.go b/pkg/sink/codec/canal/helper.go index 3ddf163971..7127252cda 100644 --- a/pkg/sink/codec/canal/helper.go +++ b/pkg/sink/codec/canal/helper.go @@ -85,6 +85,10 @@ func mysqlType2JavaType(t byte, isBinary bool) common.JavaSQLType { return common.JavaSQLTypeVARCHAR case mysql.TypeTiDBVectorFloat32: return common.JavaSQLTypeVARCHAR + case mysql.TypeNull: + return common.JavaSQLTypeNULL + case mysql.TypeGeometry: + return common.JavaSQLTypeBINARY default: } return common.JavaSQLTypeVARCHAR