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
b5ac863f
Commit
b5ac863f
authored
Nov 19, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grammar cleanup: adding missing and removing redundant semicolons
modified: sql_yacc.yy modified: sql_yacc_ora.yy
parent
7debbd78
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
46 deletions
+81
-46
sql/sql_yacc.yy
sql/sql_yacc.yy
+38
-18
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+43
-28
No files found.
sql/sql_yacc.yy
View file @
b5ac863f
...
...
@@ -2908,6 +2908,7 @@ sf_tail_not_aggregate:
}
Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
}
;
sf_tail_aggregate:
sf_tail
...
...
@@ -2918,6 +2919,7 @@ sf_tail_aggregate:
}
Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
}
;
create_function_tail:
sf_tail_not_aggregate { }
...
...
@@ -3959,6 +3961,7 @@ statement_information_item:
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
;
simple_target_specification:
ident_cli
...
...
@@ -4013,6 +4016,7 @@ condition_information_item:
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
;
condition_information_item_name:
CLASS_ORIGIN_SYM
...
...
@@ -7014,10 +7018,12 @@ field_length:
opt_field_length:
/* empty */ { $$= (char*) 0; /* use default length */ }
| field_length { $$= $1; }
;
opt_field_length_default_1:
/* empty */ { $$= (char*) "1"; }
| field_length { $$= $1; }
;
opt_precision:
/* empty */ { $$.set(0, 0); }
...
...
@@ -7478,12 +7484,14 @@ fulltext_key_opts:
opt_USING_key_algorithm:
/* Empty*/ { $$= HA_KEY_ALG_UNDEF; }
| USING btree_or_rtree { $$= $2; }
;
/* TYPE is a valid identifier, so it's handled differently than USING */
opt_key_algorithm_clause:
/* Empty*/ { $$= HA_KEY_ALG_UNDEF; }
| USING btree_or_rtree { $$= $2; }
| TYPE_SYM btree_or_rtree { $$= $2; }
;
key_using_alg:
USING btree_or_rtree
...
...
@@ -8302,6 +8310,7 @@ opt_index_lock_algorithm:
| alter_algorithm_option
| alter_lock_option alter_algorithm_option
| alter_algorithm_option alter_lock_option
;
alter_algorithm_option:
ALGORITHM_SYM opt_equal DEFAULT
...
...
@@ -8360,7 +8369,7 @@ alter_option:
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_NONE;
}
;
opt_restrict:
/* empty */ { Lex->drop_mode= DROP_DEFAULT; }
...
...
@@ -8627,6 +8636,7 @@ persistent_stat_spec:
{}
| COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec
{}
;
persistent_column_stat_spec:
ALL {}
...
...
@@ -9159,7 +9169,6 @@ query_expression:
}
;
subselect:
remember_tok_start
query_expression
...
...
@@ -9416,13 +9425,13 @@ select_alias:
opt_default_time_precision:
/* empty */ { $$= NOT_FIXED_DEC; }
| '(' ')' { $$= NOT_FIXED_DEC; }
| '(' real_ulong_num ')' { $$= $2; }
;
| '(' real_ulong_num ')' { $$= $2; }
;
opt_time_precision:
/* empty */ { $$= 0; }
| '(' ')' { $$= 0; }
| '(' real_ulong_num ')' { $$= $2; }
;
| '(' real_ulong_num ')' { $$= $2; }
;
optional_braces:
...
...
@@ -9927,6 +9936,7 @@ dyncall_create_element:
else
$$->len= 0;
}
;
dyncall_create_list:
dyncall_create_element
...
...
@@ -11389,7 +11399,7 @@ opt_gconcat_separator:
opt_gorder_clause:
/* empty */
| ORDER_SYM BY gorder_list
;
| ORDER_SYM BY gorder_list
;
gorder_list:
...
...
@@ -11885,7 +11895,6 @@ table_primary_derived:
}
;
opt_outer:
/* empty */ {}
| OUTER {}
...
...
@@ -12188,6 +12197,7 @@ opt_window_ref:
if (unlikely(thd->lex->win_ref == NULL))
MYSQL_YYABORT;
}
;
opt_window_partition_clause:
/* empty */ { }
...
...
@@ -12394,6 +12404,7 @@ opt_global_limit_clause:
Select->select_limit= $1.select_limit;
Select->offset_limit= $1.offset_limit;
}
;
limit_options:
limit_option
...
...
@@ -12457,6 +12468,7 @@ limit_rows_option:
LEX *lex=Lex;
lex->limit_rows_examined= $1;
}
;
delete_limit_clause:
/* empty */
...
...
@@ -12554,6 +12566,7 @@ opt_plus:
int_num:
opt_plus NUM { int error; $$= (int) my_strtoll10($2.str, (char**) 0, &error); }
| '-' NUM { int error; $$= -(int) my_strtoll10($2.str, (char**) 0, &error); }
;
ulong_num:
opt_plus NUM { int error; $$= (ulong) my_strtoll10($2.str, (char**) 0, &error); }
...
...
@@ -12577,7 +12590,7 @@ longlong_num:
| LONG_NUM { int error; $$= (longlong) my_strtoll10($1.str, (char**) 0, &error); }
| '-' NUM { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
| '-' LONG_NUM { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
;
ulonglong_num:
opt_plus NUM { int error; $$= (ulonglong) my_strtoll10($2.str, (char**) 0, &error); }
...
...
@@ -12614,6 +12627,7 @@ bool:
ulong_num { $$= $1 != 0; }
| TRUE_SYM { $$= 1; }
| FALSE_SYM { $$= 0; }
;
procedure_clause:
PROCEDURE_SYM ident /* Procedure name */
...
...
@@ -14282,6 +14296,7 @@ delete_domain_id:
optional_flush_tables_arguments:
/* empty */ {$$= 0;}
| AND_SYM DISABLE_SYM CHECKPOINT_SYM {$$= REFRESH_CHECKPOINT; }
;
reset:
RESET_SYM
...
...
@@ -14376,6 +14391,7 @@ kill_type:
/* Empty */ { $$= (int) KILL_HARD_BIT; }
| HARD_SYM { $$= (int) KILL_HARD_BIT; }
| SOFT_SYM { $$= 0; }
;
kill_option:
/* empty */ { $$= (int) KILL_CONNECTION; }
...
...
@@ -16341,6 +16357,7 @@ handler:
{
Lex->pop_select(); //main select
}
;
handler_tail:
table_ident OPEN_SYM opt_table_alias_clause
...
...
@@ -16536,10 +16553,12 @@ grant_command:
opt_with_admin:
/* nothing */ { Lex->definer = 0; }
| WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
;
opt_with_admin_option:
/* nothing */ { Lex->with_admin_option= false; }
| WITH ADMIN_SYM OPTION { Lex->with_admin_option= true; }
;
role_list:
grant_role
...
...
@@ -17040,7 +17059,7 @@ unit_type_decl:
{ $$.unit_type= INTERSECT_TYPE; $$.distinct= 1; }
| EXCEPT_SYM
{ $$.unit_type= EXCEPT_TYPE; $$.distinct= 1; }
;
/*
Start a UNION, for non-top level query expressions.
...
...
@@ -17499,6 +17518,7 @@ keep_gcc_happy:
{
YYERROR;
}
;
/**
@} (end of group Parser)
...
...
sql/sql_yacc_ora.yy
View file @
b5ac863f
...
...
@@ -3827,6 +3827,7 @@ statement_information_item:
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
;
simple_target_specification:
ident_cli
...
...
@@ -3881,6 +3882,7 @@ condition_information_item:
if (unlikely($$ == NULL))
MYSQL_YYABORT;
}
;
condition_information_item_name:
CLASS_ORIGIN_SYM
...
...
@@ -5236,7 +5238,6 @@ create_select_query_expression:
SELECT_LEX *first_select= $3->first_select();
$3->set_with_clause($2);
$2->attach_to(first_select);
if (Lex->parsed_insert_select(first_select))
MYSQL_YYABORT;
}
...
...
@@ -7128,11 +7129,12 @@ field_length:
opt_field_length:
/* empty */ { $$= (char*) 0; /* use default length */ }
| field_length { $$= $1; }
;
opt_field_length_default_1:
/* empty */ { $$= (char*) "1"; }
| field_length { $$= $1; }
;
/*
In sql_mode=ORACLE, real size of VARCHAR and CHAR with no length
...
...
@@ -7154,10 +7156,12 @@ opt_field_length_default_1:
opt_field_length_default_sp_param_varchar:
/* empty */ { $$.set("4000", "4000"); }
| field_length { $$.set($1, NULL); }
;
opt_field_length_default_sp_param_char:
/* empty */ { $$.set("2000", "2000"); }
| field_length { $$.set($1, NULL); }
;
opt_precision:
/* empty */ { $$.set(0, 0); }
...
...
@@ -7631,12 +7635,14 @@ fulltext_key_opts:
opt_USING_key_algorithm:
/* Empty*/ { $$= HA_KEY_ALG_UNDEF; }
| USING btree_or_rtree { $$= $2; }
;
/* TYPE is a valid identifier, so it's handled differently than USING */
opt_key_algorithm_clause:
/* Empty*/ { $$= HA_KEY_ALG_UNDEF; }
| USING btree_or_rtree { $$= $2; }
| TYPE_SYM btree_or_rtree { $$= $2; }
;
key_using_alg:
USING btree_or_rtree
...
...
@@ -8389,7 +8395,6 @@ alter_list_item:
if (lex->first_select_lex()->db.str == NULL &&
lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
if (unlikely(check_table_name($3->table.str,$3->table.length,
FALSE)) ||
($3->db.str && unlikely(check_db_name((LEX_STRING*) &$3->db))))
...
...
@@ -8453,6 +8458,7 @@ opt_index_lock_algorithm:
| alter_algorithm_option
| alter_lock_option alter_algorithm_option
| alter_algorithm_option alter_lock_option
;
alter_algorithm_option:
ALGORITHM_SYM opt_equal DEFAULT
...
...
@@ -8511,7 +8517,7 @@ alter_option:
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_NONE;
}
;
opt_restrict:
/* empty */ { Lex->drop_mode= DROP_DEFAULT; }
...
...
@@ -8778,6 +8784,7 @@ persistent_stat_spec:
{}
| COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec
{}
;
persistent_column_stat_spec:
ALL {}
...
...
@@ -9105,7 +9112,6 @@ opt_ignore_leaves:
Select : retrieve data from table
*/
select:
query_expression_body
{
...
...
@@ -9224,6 +9230,7 @@ opt_from_clause:
| from_clause
;
query_primary:
simple_table
{ $$= $1; }
...
...
@@ -9456,7 +9463,6 @@ select_lock_type:
}
;
opt_select_lock_type:
/* empty */
{
...
...
@@ -9468,7 +9474,6 @@ opt_select_lock_type:
}
;
opt_lock_wait_timeout_new:
/* empty */
{
...
...
@@ -9580,13 +9585,13 @@ select_alias:
opt_default_time_precision:
/* empty */ { $$= NOT_FIXED_DEC; }
| '(' ')' { $$= NOT_FIXED_DEC; }
| '(' real_ulong_num ')' { $$= $2; }
;
| '(' real_ulong_num ')' { $$= $2; }
;
opt_time_precision:
/* empty */ { $$= 0; }
| '(' ')' { $$= 0; }
| '(' real_ulong_num ')' { $$= $2; }
;
| '(' real_ulong_num ')' { $$= $2; }
;
optional_braces:
...
...
@@ -10085,6 +10090,7 @@ dyncall_create_element:
else
$$->len= 0;
}
;
dyncall_create_list:
dyncall_create_element
...
...
@@ -11594,7 +11600,7 @@ opt_gconcat_separator:
opt_gorder_clause:
/* empty */
| ORDER_SYM BY gorder_list
;
| ORDER_SYM BY gorder_list
;
gorder_list:
...
...
@@ -12418,6 +12424,7 @@ opt_window_ref:
if (unlikely(thd->lex->win_ref == NULL))
MYSQL_YYABORT;
}
;
opt_window_partition_clause:
/* empty */ { }
...
...
@@ -12624,6 +12631,7 @@ opt_global_limit_clause:
Select->select_limit= $1.select_limit;
Select->offset_limit= $1.offset_limit;
}
;
limit_options:
limit_option
...
...
@@ -12687,6 +12695,7 @@ limit_rows_option:
LEX *lex=Lex;
lex->limit_rows_examined= $1;
}
;
delete_limit_clause:
/* empty */
...
...
@@ -12784,6 +12793,7 @@ opt_plus:
int_num:
opt_plus NUM { int error; $$= (int) my_strtoll10($2.str, (char**) 0, &error); }
| '-' NUM { int error; $$= -(int) my_strtoll10($2.str, (char**) 0, &error); }
;
ulong_num:
opt_plus NUM { int error; $$= (ulong) my_strtoll10($2.str, (char**) 0, &error); }
...
...
@@ -12807,7 +12817,7 @@ longlong_num:
| LONG_NUM { int error; $$= (longlong) my_strtoll10($1.str, (char**) 0, &error); }
| '-' NUM { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
| '-' LONG_NUM { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
;
ulonglong_num:
opt_plus NUM { int error; $$= (ulonglong) my_strtoll10($2.str, (char**) 0, &error); }
...
...
@@ -12844,6 +12854,7 @@ bool:
ulong_num { $$= $1 != 0; }
| TRUE_SYM { $$= 1; }
| FALSE_SYM { $$= 0; }
;
procedure_clause:
PROCEDURE_SYM ident /* Procedure name */
...
...
@@ -13624,7 +13635,6 @@ delete_part2:
}
;
delete_single_table:
FROM table_ident opt_use_partition
{
...
...
@@ -13681,7 +13691,6 @@ single_multi:
}
;
opt_select_expressions:
/* empty */
| RETURNING_SYM select_item_list
...
...
@@ -14536,6 +14545,7 @@ delete_domain_id:
optional_flush_tables_arguments:
/* empty */ {$$= 0;}
| AND_SYM DISABLE_SYM CHECKPOINT_SYM {$$= REFRESH_CHECKPOINT; }
;
reset:
RESET_SYM
...
...
@@ -14628,6 +14638,7 @@ kill_type:
/* Empty */ { $$= (int) KILL_HARD_BIT; }
| HARD_SYM { $$= (int) KILL_HARD_BIT; }
| SOFT_SYM { $$= 0; }
;
kill_option:
/* empty */ { $$= (int) KILL_CONNECTION; }
...
...
@@ -16686,6 +16697,7 @@ handler:
{
Lex->pop_select(); //main select
}
;
handler_tail:
table_ident OPEN_SYM opt_table_alias_clause
...
...
@@ -16907,10 +16919,12 @@ grant_command:
opt_with_admin:
/* nothing */ { Lex->definer = 0; }
| WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
;
opt_with_admin_option:
/* nothing */ { Lex->with_admin_option= false; }
| WITH ADMIN_SYM OPTION { Lex->with_admin_option= true; }
;
role_list:
grant_role
...
...
@@ -17401,11 +17415,11 @@ unit_type_decl:
{ $$.unit_type= INTERSECT_TYPE; $$.distinct= 1; }
| EXCEPT_SYM
{ $$.unit_type= EXCEPT_TYPE; $$.distinct= 1; }
;
/*
Start a UNION, for non-top level query expressions.
*/
union_option:
/* empty */ { $$=1; }
| DISTINCT { $$=1; }
...
...
@@ -17891,6 +17905,7 @@ keep_gcc_happy:
{
YYERROR;
}
;
/**
@} (end of group Parser)
...
...
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