Skip to content

Commit

Permalink
add test for validate_password_length
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu authored and alapha23 committed Nov 26, 2018
1 parent 6b95ff5 commit 2d47a00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions executor/set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ func (s *testSuite) TestValidateSetVar(c *C) {
tk.MustExec("set @@global.validate_password_length=-1")
tk.MustQuery("show warnings").Check(testutil.RowsWithSep("|", "Warning|1292|Truncated incorrect validate_password_length value: '-1'"))

tk.MustExec("set @@global.validate_password_length=8")
tk.MustQuery("show warnings").Check(testkit.Rows())

_, err = tk.Exec("set @@tx_isolation=''")
c.Assert(terror.ErrorEqual(err, variable.ErrWrongValueForVar), IsTrue, Commentf("err %v", err))

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ require (
gopkg.in/natefinch/lumberjack.v2 v2.0.0
sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4
)

replace github.com/pingcap/parser => github.com/alapha23/parser v0.0.0-20181126070418-f5119577d517
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/Shopify/sarama v1.16.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.3+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/alapha23/parser v0.0.0-20181126070418-f5119577d517 h1:TfOLSy1ypCKqWjSwpV9zx4yyX5GNoJvsQM3KBReoT6Y=
github.com/alapha23/parser v0.0.0-20181126070418-f5119577d517/go.mod h1:43oaFTPY5wIvNxt3TSa+1SZtJ645w/1AlsDmSioWtuQ=
github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7 h1:CZI8h5fmYwCCvd2RMSsjLqHN6OqABlWJweFKxz4vdEs=
github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/beorn7/perks v0.0.0-20160229213445-3ac7bf7a47d1/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down

0 comments on commit 2d47a00

Please sign in to comment.