Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9718e374
Commit
9718e374
authored
Feb 15, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sql_yacc_ora.yy to match sql_yacc.yy
parent
81e4b9b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
14 deletions
+60
-14
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-2
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+59
-12
No files found.
sql/sql_yacc.yy
View file @
9718e374
...
...
@@ -12181,9 +12181,8 @@ table_primary_ident:
Select->pop_index_hints(),
$2)))
MYSQL_YYABORT;
TABLE_LIST *tl= $$;
if ($3)
tl
->vers_conditions= Lex->vers_conditions;
$$
->vers_conditions= Lex->vers_conditions;
}
;
...
...
sql/sql_yacc_ora.yy
View file @
9718e374
...
...
@@ -1431,6 +1431,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
table_primary_ident table_primary_derived
derived_table_list table_reference_list_parens
nested_table_reference_list join_table_parens
update_table_list
%type <date_time_type> date_time_type;
%type <interval> interval
...
...
@@ -1569,6 +1570,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
key_using_alg
part_column_list
period_for_system_time
period_for_application_time
server_def server_options_list server_option
definer_opt no_definer definer get_diagnostics
parse_vcol_expr vcol_opt_specifier vcol_opt_attribute
...
...
@@ -6475,6 +6477,7 @@ field_list_item:
| key_def
| constraint_def
| period_for_system_time
| PERIOD_SYM period_for_application_time { }
;
column_def:
...
...
@@ -6582,9 +6585,12 @@ period_for_system_time:
Vers_parse_info &info= Lex->vers_get_info();
info.set_period($4, $6);
}
| PERIOD_SYM FOR_SYM ident '(' ident ',' ident ')'
;
period_for_application_time:
FOR_SYM ident '(' ident ',' ident ')'
{
if (Lex->add_period($
3, $5, $7
))
if (Lex->add_period($
2, $4, $6
))
MYSQL_YYABORT;
}
;
...
...
@@ -8350,6 +8356,13 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
| ADD
PERIOD_SYM opt_if_not_exists_table_element period_for_application_time
{
Table_period_info &period= Lex->create_info.period_info;
period.create_if_not_exists= Lex->check_exists;
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
}
| add_column '(' create_field_list ')'
{
LEX *lex=Lex;
...
...
@@ -8519,6 +8532,14 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
| DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident
{
Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, $5.str, $3);
if (unlikely(ad == NULL))
MYSQL_YYABORT;
Lex->alter_info.drop_list.push_back(ad, thd->mem_root);
Lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
}
;
opt_index_lock_algorithm:
...
...
@@ -9468,20 +9489,29 @@ history_point:
}
;
for_portion_of_time_clause:
FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM
bit_expr TO_SYM bit_expr
{
if (unlikely(0 == strcasecmp($5.str, "SYSTEM_TIME")))
{
thd->parse_error(ER_SYNTAX_ERROR, $4);
MYSQL_YYABORT;
}
Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
Vers_history_point(VERS_TIMESTAMP, $7),
Vers_history_point(VERS_TIMESTAMP, $9),
$5);
}
opt_for_portion_of_time_clause:
/* empty */
{
$$= false;
}
| FOR_SYM PORTION_SYM OF_SYM ident FROM history_point TO_SYM history_point
{
if (unlikely(0 == strcasecmp($4.str, "SYSTEM_TIME")))
| for_portion_of_time_clause
{
thd->parse_error(ER_SYNTAX_ERROR, $4.str);
MYSQL_YYABORT;
}
$$= true;
Lex->period_conditions.init(SYSTEM_TIME_FROM_TO, $6, $8, $4);
}
;
...
...
@@ -13620,6 +13650,24 @@ opt_insert_update:
}
;
update_table_list:
table_ident opt_use_partition for_portion_of_time_clause
opt_table_alias_clause opt_key_definition
{
SELECT_LEX *sel= Select;
sel->table_join_options= 0;
if (!($$= Select->add_table_to_list(thd, $1, $4,
Select->get_table_join_options(),
YYPS->m_lock_type,
YYPS->m_mdl_type,
Select->pop_index_hints(),
$2)))
MYSQL_YYABORT;
$$->period_conditions= Lex->period_conditions;
}
| join_table_list { $$= $1; }
;
/* Update rows in a table */
update:
...
...
@@ -13632,7 +13680,7 @@ update:
lex->sql_command= SQLCOM_UPDATE;
lex->duplicates= DUP_ERROR;
}
opt_low_priority opt_ignore
join
_table_list
opt_low_priority opt_ignore
update
_table_list
SET update_list
{
LEX *lex= Lex;
...
...
@@ -13748,18 +13796,17 @@ delete_single_table:
MYSQL_YYABORT;
YYPS->m_lock_type= TL_READ_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_READ;
Lex->last_table()->period_conditions= Lex->period_conditions;
}
;
delete_single_table_for_period:
delete_single_table opt_for_portion_of_time_clause
{
if ($2)
Lex->last_table()->period_conditions= Lex->period_conditions;
}
;
single_multi:
delete_single_table_for_period
opt_where_clause
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment