Skip to content

Commit

Permalink
infoschema/slow_query: fix shallow copy problem (pingcap#10696)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed Jun 6, 2019
1 parent 7e6f146 commit 18c3037
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 @@ -188,6 +189,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 18c3037

Please sign in to comment.