@@ -238,10 +238,8 @@ func (e *TableMapEvent) decodeMeta(data []byte) error {
238
238
}
239
239
240
240
func (e * TableMapEvent ) decodeOptionalMeta (data []byte ) (err error ) {
241
-
242
241
pos := 0
243
242
for pos < len (data ) {
244
-
245
243
// optional metadata fields are stored in Type, Length, Value(TLV) format
246
244
// Type takes 1 byte. Length is a packed integer value. Values takes Length bytes
247
245
t := data [pos ]
@@ -637,7 +635,6 @@ func (e *TableMapEvent) EnumSetCollationMap() map[int]uint64 {
637
635
}
638
636
639
637
func (e * TableMapEvent ) collationMap (includeType func (int ) bool , defaultCharset , columnCharset []uint64 ) map [int ]uint64 {
640
-
641
638
if len (defaultCharset ) != 0 {
642
639
defaultCollation := defaultCharset [0 ]
643
640
@@ -666,7 +663,6 @@ func (e *TableMapEvent) collationMap(includeType func(int) bool, defaultCharset,
666
663
}
667
664
668
665
if len (columnCharset ) != 0 {
669
-
670
666
p := 0
671
667
ret := make (map [int ]uint64 )
672
668
for i := 0 ; i < int (e .ColumnCount ); i ++ {
@@ -739,7 +735,6 @@ func (e *TableMapEvent) GeometryTypeMap() map[int]uint64 {
739
735
// Table_map_log_event::print_columns in mysql-8.0/sql/log_event.cc and mariadb-10.5/sql/log_event_client.cc
740
736
741
737
func (e * TableMapEvent ) realType (i int ) byte {
742
-
743
738
typ := e .ColumnType [i ]
744
739
745
740
switch typ {
@@ -757,7 +752,6 @@ func (e *TableMapEvent) realType(i int) byte {
757
752
}
758
753
759
754
func (e * TableMapEvent ) IsNumericColumn (i int ) bool {
760
-
761
755
switch e .realType (i ) {
762
756
case MYSQL_TYPE_TINY ,
763
757
MYSQL_TYPE_SHORT ,
@@ -772,14 +766,12 @@ func (e *TableMapEvent) IsNumericColumn(i int) bool {
772
766
default :
773
767
return false
774
768
}
775
-
776
769
}
777
770
778
771
// IsCharacterColumn returns true if the column type is considered as character type.
779
772
// Note that JSON/GEOMETRY types are treated as character type in mariadb.
780
773
// (JSON is an alias for LONGTEXT in mariadb: https://mariadb.com/kb/en/json-data-type/)
781
774
func (e * TableMapEvent ) IsCharacterColumn (i int ) bool {
782
-
783
775
switch e .realType (i ) {
784
776
case MYSQL_TYPE_STRING ,
785
777
MYSQL_TYPE_VAR_STRING ,
@@ -796,7 +788,6 @@ func (e *TableMapEvent) IsCharacterColumn(i int) bool {
796
788
default :
797
789
return false
798
790
}
799
-
800
791
}
801
792
802
793
func (e * TableMapEvent ) IsEnumColumn (i int ) bool {
0 commit comments