fixed #{1330} : add "lock in share mode" function support.
This commit is contained in:
@ -388,7 +388,7 @@ END_P SET_VAR DELIMITER
|
||||
%type <node> simple_select no_table_select limit_clause select_expr_list
|
||||
%type <node> with_select with_clause with_list common_table_expr opt_column_alias_name_list alias_name_list column_alias_name
|
||||
%type <node> opt_where opt_hint_value opt_groupby opt_rollup opt_order_by order_by opt_having groupby_clause
|
||||
%type <node> opt_limit_clause limit_expr opt_for_update opt_for_update_wait
|
||||
%type <node> opt_limit_clause limit_expr opt_lock_type opt_for_update opt_for_update_wait opt_lock_in_share_mode
|
||||
%type <node> sort_list sort_key opt_asc_desc sort_list_for_group_by sort_key_for_group_by opt_asc_desc_for_group_by opt_column_id
|
||||
%type <node> opt_query_expression_option_list query_expression_option_list query_expression_option opt_distinct opt_distinct_or_all opt_separator projection
|
||||
%type <node> from_list table_references table_reference table_factor normal_relation_factor dot_relation_factor relation_factor
|
||||
@ -7679,23 +7679,36 @@ select_with_parens:
|
||||
| '(' with_select ')' { $$ = $2; };
|
||||
|
||||
select_no_parens:
|
||||
select_clause opt_for_update
|
||||
select_clause opt_lock_type
|
||||
{
|
||||
$$ = $1;
|
||||
$$->children_[PARSE_SELECT_FOR_UPD] = $2;
|
||||
}
|
||||
| select_clause_set opt_for_update
|
||||
| select_clause_set opt_lock_type
|
||||
{
|
||||
$$ = $1;
|
||||
$$->children_[PARSE_SELECT_FOR_UPD] = $2;
|
||||
}
|
||||
| select_clause_set_with_order_and_limit opt_for_update
|
||||
| select_clause_set_with_order_and_limit opt_lock_type
|
||||
{
|
||||
$$ = $1;
|
||||
$$->children_[PARSE_SELECT_FOR_UPD] = $2;
|
||||
}
|
||||
;
|
||||
|
||||
opt_lock_type:
|
||||
/* EMPTY */
|
||||
{ $$ = NULL; }
|
||||
| opt_for_update
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| opt_lock_in_share_mode
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
no_table_select:
|
||||
select_with_opt_hint opt_query_expression_option_list select_expr_list into_opt %prec LOWER_PARENS
|
||||
{
|
||||
@ -9124,14 +9137,20 @@ opt_limit_clause:
|
||||
;
|
||||
|
||||
opt_for_update:
|
||||
/* EMPTY */
|
||||
{ $$ = NULL; }
|
||||
| FOR UPDATE opt_for_update_wait
|
||||
FOR UPDATE opt_for_update_wait
|
||||
{
|
||||
$$ = $3;
|
||||
}
|
||||
;
|
||||
|
||||
opt_lock_in_share_mode:
|
||||
LOCK_ IN SHARE MODE
|
||||
{
|
||||
malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT);
|
||||
$$->value_ = -1;
|
||||
}
|
||||
;
|
||||
|
||||
opt_for_update_wait:
|
||||
/* EMPTY */
|
||||
{
|
||||
|
Reference in New Issue
Block a user