@@ -18,7 +18,7 @@ func (mf *mysqlField) typeDatabaseName() string {
18
18
case fieldTypeBit :
19
19
return "BIT"
20
20
case fieldTypeBLOB :
21
- if mf .charSet != collations [ binaryCollation ] {
21
+ if mf .charSet != binaryCollationID {
22
22
return "TEXT"
23
23
}
24
24
return "BLOB"
@@ -49,7 +49,7 @@ func (mf *mysqlField) typeDatabaseName() string {
49
49
}
50
50
return "INT"
51
51
case fieldTypeLongBLOB :
52
- if mf .charSet != collations [ binaryCollation ] {
52
+ if mf .charSet != binaryCollationID {
53
53
return "LONGTEXT"
54
54
}
55
55
return "LONGBLOB"
@@ -59,7 +59,7 @@ func (mf *mysqlField) typeDatabaseName() string {
59
59
}
60
60
return "BIGINT"
61
61
case fieldTypeMediumBLOB :
62
- if mf .charSet != collations [ binaryCollation ] {
62
+ if mf .charSet != binaryCollationID {
63
63
return "MEDIUMTEXT"
64
64
}
65
65
return "MEDIUMBLOB"
@@ -77,7 +77,7 @@ func (mf *mysqlField) typeDatabaseName() string {
77
77
}
78
78
return "SMALLINT"
79
79
case fieldTypeString :
80
- if mf .charSet == collations [ binaryCollation ] {
80
+ if mf .charSet == binaryCollationID {
81
81
return "BINARY"
82
82
}
83
83
return "CHAR"
@@ -91,17 +91,17 @@ func (mf *mysqlField) typeDatabaseName() string {
91
91
}
92
92
return "TINYINT"
93
93
case fieldTypeTinyBLOB :
94
- if mf .charSet != collations [ binaryCollation ] {
94
+ if mf .charSet != binaryCollationID {
95
95
return "TINYTEXT"
96
96
}
97
97
return "TINYBLOB"
98
98
case fieldTypeVarChar :
99
- if mf .charSet == collations [ binaryCollation ] {
99
+ if mf .charSet == binaryCollationID {
100
100
return "VARBINARY"
101
101
}
102
102
return "VARCHAR"
103
103
case fieldTypeVarString :
104
- if mf .charSet == collations [ binaryCollation ] {
104
+ if mf .charSet == binaryCollationID {
105
105
return "VARBINARY"
106
106
}
107
107
return "VARCHAR"
@@ -194,7 +194,7 @@ func (mf *mysqlField) scanType() reflect.Type {
194
194
195
195
case fieldTypeBit , fieldTypeTinyBLOB , fieldTypeMediumBLOB , fieldTypeLongBLOB ,
196
196
fieldTypeBLOB , fieldTypeVarString , fieldTypeString , fieldTypeGeometry :
197
- if mf .charSet == 63 /* binary */ {
197
+ if mf .charSet == binaryCollationID {
198
198
return scanTypeBytes
199
199
}
200
200
fallthrough
0 commit comments