Skip to content

Commit

Permalink
Merge branch 'master' into no-async-commit-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Feb 26, 2021
2 parents 750dece + 03109ad commit 10084d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
docker:
- image: golang:1.15
- image: golang:1.16
working_directory: /go/src/github.com/pingcap/tidb
steps:
- checkout
Expand Down
5 changes: 2 additions & 3 deletions session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4207,11 +4207,10 @@ func (s *testSessionSerialSuite) TestParseWithParams(c *C) {
c.Assert(err, IsNil)

var sb strings.Builder
ctx := format.NewRestoreCtx(0, &sb)
ctx := format.NewRestoreCtx(format.RestoreStringDoubleQuotes, &sb)
err = stmt.Restore(ctx)
c.Assert(err, IsNil)
// FIXME: well... so the restore function is vulnerable...
c.Assert(sb.String(), Equals, "SELECT * FROM test WHERE name=_utf8mb4\xbf' OR 1=1 /* LIMIT 1")
c.Assert(sb.String(), Equals, "SELECT * FROM test WHERE name=_utf8mb4\"\xbf' OR 1=1 /*\" LIMIT 1")

// test invalid sql
_, err = exec.ParseWithParams(context.TODO(), "SELECT")
Expand Down

0 comments on commit 10084d8

Please sign in to comment.