Merge pull request #326 from pingcap/shenli/dollar-in-identifier
parser: Support dollar in identifier
This commit is contained in:
@ -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 {
|
||||
|
||||
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user