Merge pull request #326 from pingcap/shenli/dollar-in-identifier

parser: Support dollar in identifier
This commit is contained in:
goroutine
2015-10-08 14:44:41 +08:00
2 changed files with 4 additions and 1 deletions

View File

@ -469,6 +469,9 @@ func (s *testParserSuite) TestParser0(c *C) {
// For quote identifier
{"select `a`, `a.b`, `a b` from t", true},
// For unquoted identifier
{"create table MergeContextTest$Simple (value integer not null, primary key (value))", true},
}
for _, t := range table {

View File

@ -464,7 +464,7 @@ user {u}{s}{e}{r}
using {u}{s}{i}{n}{g}
idchar0 [a-zA-Z_]
idchars {idchar0}|[0-9]
idchars {idchar0}|[0-9$] // See: https://dev.mysql.com/doc/refman/5.7/en/identifiers.html
ident {idchar0}{idchars}*
user_var "@"{ident}