Commit 3c634602 authored by Aleksey Midenkov's avatar Aleksey Midenkov

Parser: SYSTEM_TIME_SYM (fixes #67)

parent 7d815be1
......@@ -132,6 +132,8 @@ void compute_tokens()
set_token(WITH_CUBE_SYM, "WITH CUBE");
set_token(WITH_ROLLUP_SYM, "WITH ROLLUP");
set_token(WITH_SYSTEM_SYM, "WITH SYSTEM");
set_token(FOR_SYSTEM_TIME_SYM, "FOR SYSTEM_TIME");
set_token(NOT2_SYM, "!");
set_token(OR2_SYM, "|");
set_token(PARAM_MARKER, "?");
......
......@@ -1333,6 +1333,8 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd)
return WITH_CUBE_SYM;
case ROLLUP_SYM:
return WITH_ROLLUP_SYM;
case SYSTEM:
return WITH_SYSTEM_SYM;
default:
/*
Save the token following 'WITH'
......
......@@ -859,10 +859,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%parse-param { THD *thd }
%lex-param { THD *thd }
/*
Currently there are 106 shift/reduce conflicts.
Currently there are 103 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 106
%expect 103
/*
Comments for TOKENS.
......@@ -1093,7 +1093,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token FORCE_SYM
%token FOREIGN /* SQL-2003-R */
%token FOR_SYM /* SQL-2003-R */
%token FOR_SYSTEM_TIME_SYM /* internal */
%token FOR_SYSTEM_TIME_SYM /* INTERNAL */
%token FORMAT_SYM
%token FOUND_SYM /* SQL-2003-R */
%token FROM
......@@ -1575,6 +1575,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token WITHOUT /* SQL-2003-R */
%token WITH_CUBE_SYM /* INTERNAL */
%token WITH_ROLLUP_SYM /* INTERNAL */
%token WITH_SYSTEM_SYM /* INTERNAL */
%token WORK_SYM /* SQL-2003-N */
%token WRAPPER_SYM
%token WRITE_SYM /* SQL-2003-N */
......@@ -5849,7 +5850,7 @@ create_table_option:
Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
Lex->create_info.sequence= $3;
}
| WITH SYSTEM VERSIONING
| WITH_SYSTEM_SYM VERSIONING
{
Vers_parse_info &info= Lex->vers_get_info();
info.declared_system_versioning= true;
......@@ -6666,7 +6667,7 @@ serial_attribute:
new (thd->mem_root)
engine_option_value($1, &Lex->last_field->option_list, &Lex->option_list_last);
}
| WITH SYSTEM VERSIONING
| WITH_SYSTEM_SYM VERSIONING
{
Lex->last_field->versioning = Column_definition::WITH_VERSIONING;
Lex->create_info.vers_info.has_versioned_fields= true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment