Skip to content

Commit

Permalink
infoschema/slow_query: fix shallow copy problem (#10696) (#10776)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 authored and ngaut committed Jun 12, 2019
1 parent 8cdccca commit d3d2247
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions infoschema/slow_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/pingcap/tidb/util/execdetails"
"github.com/pingcap/tidb/util/hack"
"github.com/pingcap/tidb/util/logutil"
"github.com/pingcap/tidb/util/stringutil"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -184,6 +185,7 @@ type slowQueryTuple struct {
}

func (st *slowQueryTuple) setFieldValue(tz *time.Location, field, value string) error {
value = stringutil.Copy(value)
switch field {
case variable.SlowLogTimeStr:
t, err := ParseTime(value)
Expand Down

0 comments on commit d3d2247

Please sign in to comment.