@@ -676,7 +676,7 @@ func (mc *mysqlConn) readColumns(count int) ([]mysqlField, error) {
676
676
pos += n + 1 + 2 + 4
677
677
678
678
// Field type [uint8]
679
- columns [i ].fieldType = data [pos ]
679
+ columns [i ].fieldType = fieldType ( data [pos ])
680
680
pos ++
681
681
682
682
// Flags [uint16]
@@ -960,15 +960,15 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
960
960
// build NULL-bitmap
961
961
if arg == nil {
962
962
nullMask [i / 8 ] |= 1 << (uint (i ) & 7 )
963
- paramTypes [i + i ] = fieldTypeNULL
963
+ paramTypes [i + i ] = byte ( fieldTypeNULL )
964
964
paramTypes [i + i + 1 ] = 0x00
965
965
continue
966
966
}
967
967
968
968
// cache types and values
969
969
switch v := arg .(type ) {
970
970
case int64 :
971
- paramTypes [i + i ] = fieldTypeLongLong
971
+ paramTypes [i + i ] = byte ( fieldTypeLongLong )
972
972
paramTypes [i + i + 1 ] = 0x00
973
973
974
974
if cap (paramValues )- len (paramValues )- 8 >= 0 {
@@ -984,7 +984,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
984
984
}
985
985
986
986
case float64 :
987
- paramTypes [i + i ] = fieldTypeDouble
987
+ paramTypes [i + i ] = byte ( fieldTypeDouble )
988
988
paramTypes [i + i + 1 ] = 0x00
989
989
990
990
if cap (paramValues )- len (paramValues )- 8 >= 0 {
@@ -1000,7 +1000,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1000
1000
}
1001
1001
1002
1002
case bool :
1003
- paramTypes [i + i ] = fieldTypeTiny
1003
+ paramTypes [i + i ] = byte ( fieldTypeTiny )
1004
1004
paramTypes [i + i + 1 ] = 0x00
1005
1005
1006
1006
if v {
@@ -1012,7 +1012,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1012
1012
case []byte :
1013
1013
// Common case (non-nil value) first
1014
1014
if v != nil {
1015
- paramTypes [i + i ] = fieldTypeString
1015
+ paramTypes [i + i ] = byte ( fieldTypeString )
1016
1016
paramTypes [i + i + 1 ] = 0x00
1017
1017
1018
1018
if len (v ) < mc .maxAllowedPacket - pos - len (paramValues )- (len (args )- (i + 1 ))* 64 {
@@ -1030,11 +1030,11 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1030
1030
1031
1031
// Handle []byte(nil) as a NULL value
1032
1032
nullMask [i / 8 ] |= 1 << (uint (i ) & 7 )
1033
- paramTypes [i + i ] = fieldTypeNULL
1033
+ paramTypes [i + i ] = byte ( fieldTypeNULL )
1034
1034
paramTypes [i + i + 1 ] = 0x00
1035
1035
1036
1036
case string :
1037
- paramTypes [i + i ] = fieldTypeString
1037
+ paramTypes [i + i ] = byte ( fieldTypeString )
1038
1038
paramTypes [i + i + 1 ] = 0x00
1039
1039
1040
1040
if len (v ) < mc .maxAllowedPacket - pos - len (paramValues )- (len (args )- (i + 1 ))* 64 {
@@ -1049,7 +1049,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1049
1049
}
1050
1050
1051
1051
case time.Time :
1052
- paramTypes [i + i ] = fieldTypeString
1052
+ paramTypes [i + i ] = byte ( fieldTypeString )
1053
1053
paramTypes [i + i + 1 ] = 0x00
1054
1054
1055
1055
var val []byte
0 commit comments