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
92306dd0
Commit
92306dd0
authored
Sep 22, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b11553
parents
e84173a1
66929c95
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
sql/sql_yacc.yy
sql/sql_yacc.yy
+20
-4
No files found.
sql/sql_yacc.yy
View file @
92306dd0
...
...
@@ -644,7 +644,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
NUM_literal
%type <item_list>
expr_list udf_expr_list when_list ident_list ident_list_arg
expr_list udf_expr_list udf_sum_expr_list when_list ident_list
ident_list_arg
%type <key_type>
key_type opt_unique_or_fulltext constraint_key_type
...
...
@@ -3137,21 +3138,21 @@ simple_expr:
{ $$= new Item_func_trim($5,$3); }
| TRUNCATE_SYM '(' expr ',' expr ')'
{ $$= new Item_func_round($3,$5,1); }
| UDA_CHAR_SUM '(' udf_expr_list ')'
| UDA_CHAR_SUM '(' udf_
sum_
expr_list ')'
{
if ($3 != NULL)
$$ = new Item_sum_udf_str($1, *$3);
else
$$ = new Item_sum_udf_str($1);
}
| UDA_FLOAT_SUM '(' udf_expr_list ')'
| UDA_FLOAT_SUM '(' udf_
sum_
expr_list ')'
{
if ($3 != NULL)
$$ = new Item_sum_udf_float($1, *$3);
else
$$ = new Item_sum_udf_float($1);
}
| UDA_INT_SUM '(' udf_expr_list ')'
| UDA_INT_SUM '(' udf_
sum_
expr_list ')'
{
if ($3 != NULL)
$$ = new Item_sum_udf_int($1, *$3);
...
...
@@ -3289,6 +3290,21 @@ udf_expr_list:
/* empty */ { $$= NULL; }
| expr_list { $$= $1;};
udf_sum_expr_list:
{
LEX *lex= Lex;
if (lex->current_select->inc_in_sum_expr())
{
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
}
udf_expr_list
{
Select->in_sum_expr--;
$$= $2;
};
sum_expr:
AVG_SYM '(' in_sum_expr ')'
{ $$=new Item_sum_avg($3); }
...
...
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