@@ -703,7 +703,7 @@ func (mc *mysqlConn) readColumns(count int) ([]mysqlField, error) {
703
703
pos += n + 1 + 2 + 4
704
704
705
705
// Field type [uint8]
706
- columns [i ].fieldType = data [pos ]
706
+ columns [i ].fieldType = fieldType ( data [pos ])
707
707
pos ++
708
708
709
709
// Flags [uint16]
@@ -980,15 +980,15 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
980
980
// build NULL-bitmap
981
981
if arg == nil {
982
982
nullMask [i / 8 ] |= 1 << (uint (i ) & 7 )
983
- paramTypes [i + i ] = fieldTypeNULL
983
+ paramTypes [i + i ] = byte ( fieldTypeNULL )
984
984
paramTypes [i + i + 1 ] = 0x00
985
985
continue
986
986
}
987
987
988
988
// cache types and values
989
989
switch v := arg .(type ) {
990
990
case int64 :
991
- paramTypes [i + i ] = fieldTypeLongLong
991
+ paramTypes [i + i ] = byte ( fieldTypeLongLong )
992
992
paramTypes [i + i + 1 ] = 0x00
993
993
994
994
if cap (paramValues )- len (paramValues )- 8 >= 0 {
@@ -1004,7 +1004,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1004
1004
}
1005
1005
1006
1006
case float64 :
1007
- paramTypes [i + i ] = fieldTypeDouble
1007
+ paramTypes [i + i ] = byte ( fieldTypeDouble )
1008
1008
paramTypes [i + i + 1 ] = 0x00
1009
1009
1010
1010
if cap (paramValues )- len (paramValues )- 8 >= 0 {
@@ -1020,7 +1020,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1020
1020
}
1021
1021
1022
1022
case bool :
1023
- paramTypes [i + i ] = fieldTypeTiny
1023
+ paramTypes [i + i ] = byte ( fieldTypeTiny )
1024
1024
paramTypes [i + i + 1 ] = 0x00
1025
1025
1026
1026
if v {
@@ -1032,7 +1032,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1032
1032
case []byte :
1033
1033
// Common case (non-nil value) first
1034
1034
if v != nil {
1035
- paramTypes [i + i ] = fieldTypeString
1035
+ paramTypes [i + i ] = byte ( fieldTypeString )
1036
1036
paramTypes [i + i + 1 ] = 0x00
1037
1037
1038
1038
if len (v ) < mc .maxAllowedPacket - pos - len (paramValues )- (len (args )- (i + 1 ))* 64 {
@@ -1050,11 +1050,11 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1050
1050
1051
1051
// Handle []byte(nil) as a NULL value
1052
1052
nullMask [i / 8 ] |= 1 << (uint (i ) & 7 )
1053
- paramTypes [i + i ] = fieldTypeNULL
1053
+ paramTypes [i + i ] = byte ( fieldTypeNULL )
1054
1054
paramTypes [i + i + 1 ] = 0x00
1055
1055
1056
1056
case string :
1057
- paramTypes [i + i ] = fieldTypeString
1057
+ paramTypes [i + i ] = byte ( fieldTypeString )
1058
1058
paramTypes [i + i + 1 ] = 0x00
1059
1059
1060
1060
if len (v ) < mc .maxAllowedPacket - pos - len (paramValues )- (len (args )- (i + 1 ))* 64 {
@@ -1069,7 +1069,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1069
1069
}
1070
1070
1071
1071
case time.Time :
1072
- paramTypes [i + i ] = fieldTypeString
1072
+ paramTypes [i + i ] = byte ( fieldTypeString )
1073
1073
paramTypes [i + i + 1 ] = 0x00
1074
1074
1075
1075
var a [64 ]byte
0 commit comments