Skip to content

Commit

Permalink
Adding missing semicolons to sql_yacc.yy (10.3), indentation cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
abarkov committed Sep 11, 2019
1 parent 48f8e3f commit f1309fa
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions sql/sql_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -2901,24 +2901,26 @@ create:
;

sf_tail_not_aggregate:
sf_tail
{
if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
sf_tail
{
my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
{
my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
}
Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
}
Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
}
;

sf_tail_aggregate:
sf_tail
{
if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
sf_tail
{
my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
{
my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
}
Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
}
Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
}
;

create_function_tail:
sf_tail_not_aggregate { }
Expand Down Expand Up @@ -13008,6 +13010,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); }
Expand All @@ -13031,7 +13034,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); }
Expand Down Expand Up @@ -13068,7 +13071,7 @@ bool:
ulong_num { $$= $1 != 0; }
| TRUE_SYM { $$= 1; }
| FALSE_SYM { $$= 0; }

;

procedure_clause:
PROCEDURE_SYM ident /* Procedure name */
Expand Down Expand Up @@ -17492,7 +17495,7 @@ unit_type_decl:
{ $$= INTERSECT_TYPE; }
| EXCEPT_SYM
{ $$= EXCEPT_TYPE; }

;

union_clause:
/* empty */ {}
Expand Down

0 comments on commit f1309fa

Please sign in to comment.