Skip to content

Commit

Permalink
test: add more tests for user-defined variables
Browse files Browse the repository at this point in the history
  • Loading branch information
qazbnm456 committed Jul 10, 2018
1 parent ad40fd0 commit bfafd16
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,17 @@ func (s *testParserSuite) TestDBAStmt(c *C) {
{"load stats '/tmp/stats.json'", true},
// set
// user defined
{"SET @ = 1", true},
{"SET @' ' = 1", true},
{"SET @! = 1", false},
{"SET @1 = 1", true},
{"SET @a = 1", true},
{"SET @b := 1", true},
{"SET @.c = 1", true},
{"SET @_d = 1", true},
{"SET @_e._$. = 1", true},
{"SET @~f = 1", false},
{"SET @`g,` = 1", true},
// session system variables
{"SET SESSION autocommit = 1", true},
{"SET @@session.autocommit = 1", true},
Expand Down

0 comments on commit bfafd16

Please sign in to comment.