Skip to content

Commit

Permalink
move CURRENT to non-reserved (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifersp committed Apr 20, 2022
1 parent b48d222 commit fd55765
Show file tree
Hide file tree
Showing 3 changed files with 4,264 additions and 4,231 deletions.
12 changes: 12 additions & 0 deletions go/vt/sqlparser/parse_test.go
Expand Up @@ -2452,6 +2452,18 @@ var (
}, {
input: "CREATE DATABASE `somedb` CHARACTER SET binary CHARSET binary COLLATE binary collate binary encryption 'n' encryption 'n'",
output: "create database somedb character set binary charset binary collate binary collate binary encryption n encryption n",
}, {
input: "select * from current",
output: "select * from `current`",
}, {
input: "select * from prev as current",
output: "select * from prev as `current`",
}, {
input: "select current from table1",
output: "select `current` from table1",
}, {
input: "select prev as current from table1",
output: "select prev as `current` from table1",
}, {
input: "CREATE TABLE mytable (h int DEFAULT (date_format(now(),_utf8mb4'%Y')))",
output: "create table mytable (\n\th int default (date_format(now(), _utf8mb4 '%Y'))\n)",
Expand Down

0 comments on commit fd55765

Please sign in to comment.