File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -741,11 +741,10 @@ func (e *TableMapEvent) GeometryTypeMap() map[int]uint64 {
741
741
func (e * TableMapEvent ) realType (i int ) byte {
742
742
743
743
typ := e .ColumnType [i ]
744
- meta := e .ColumnMeta [i ]
745
744
746
745
switch typ {
747
746
case MYSQL_TYPE_STRING :
748
- rtyp := byte (meta >> 8 )
747
+ rtyp := byte (e . ColumnMeta [ i ] >> 8 )
749
748
if rtyp == MYSQL_TYPE_ENUM || rtyp == MYSQL_TYPE_SET {
750
749
return rtyp
751
750
}
@@ -776,6 +775,9 @@ func (e *TableMapEvent) IsNumericColumn(i int) bool {
776
775
777
776
}
778
777
778
+ // IsCharacterColumn returns true if the column type is considered as character type.
779
+ // Note that JSON/GEOMETRY types are treated as character type in mariadb.
780
+ // (JSON is an alias for LONGTEXT in mariadb: https://mariadb.com/kb/en/json-data-type/)
779
781
func (e * TableMapEvent ) IsCharacterColumn (i int ) bool {
780
782
781
783
switch e .realType (i ) {
You can’t perform that action at this time.
0 commit comments