File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 12
12
# Individual Persons
13
13
14
14
Aaron Hopkins <go-sql-driver at die.net>
15
+ Achille Roussel <achille.roussel at gmail.com>
15
16
Arne Hormann <arnehormann at gmail.com>
16
17
Asta Xie <xiemengjun at gmail.com>
17
18
Bulat Gaifullin <gaifullinbf at gmail.com>
Original file line number Diff line number Diff line change @@ -1078,17 +1078,19 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1078
1078
paramTypes [i + i ] = fieldTypeString
1079
1079
paramTypes [i + i + 1 ] = 0x00
1080
1080
1081
- var val []byte
1081
+ var a [64 ]byte
1082
+ var b = a [:0 ]
1083
+
1082
1084
if v .IsZero () {
1083
- val = [] byte ( "0000-00-00" )
1085
+ b = append ( b , "0000-00-00" ... )
1084
1086
} else {
1085
- val = [] byte ( v .In (mc .cfg .Loc ).Format ( timeFormat ) )
1087
+ b = v .In (mc .cfg .Loc ).AppendFormat ( b , timeFormat )
1086
1088
}
1087
1089
1088
1090
paramValues = appendLengthEncodedInteger (paramValues ,
1089
- uint64 (len (val )),
1091
+ uint64 (len (b )),
1090
1092
)
1091
- paramValues = append (paramValues , val ... )
1093
+ paramValues = append (paramValues , b ... )
1092
1094
1093
1095
default :
1094
1096
return fmt .Errorf ("can not convert type: %T" , arg )
You can’t perform that action at this time.
0 commit comments