Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Make sure quoted identifiers start with any character
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Marianiello <andremarianiello@github.com>
  • Loading branch information
Andre Marianiello committed May 30, 2019
1 parent 6967183 commit 0fd62c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sql/parse/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,7 @@ var fixtures = map[string]sql.Node{
"SHOW CREATE TABLE `my``table`": plan.NewShowCreateTable("", nil, "my`table"),
"SHOW CREATE TABLE `my``db`.`my``table`": plan.NewShowCreateTable("my`db", nil, "my`table"),
"SHOW CREATE TABLE ````": plan.NewShowCreateTable("", nil, "`"),
"SHOW CREATE TABLE `.`": plan.NewShowCreateTable("", nil, "."),
`SELECT '2018-05-01' + INTERVAL 1 DAY`: plan.NewProject(
[]sql.Expression{expression.NewArithmetic(
expression.NewLiteral("2018-05-01", sql.Text),
Expand Down
2 changes: 1 addition & 1 deletion sql/parse/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func readIdent(ident *string) parseFunc {
func readQuotedIdent(ident *string) parseFunc {
return func(r *bufio.Reader) error {
var buf bytes.Buffer
if err := readLetter(r, &buf); err != nil {
if err := readValidQuotedIdentRune(r, &buf); err != nil {
return err
}

Expand Down

0 comments on commit 0fd62c4

Please sign in to comment.