summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy19
1 files changed, 4 insertions, 15 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index fcac7eb8e05..434cd0e4cd5 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -6426,7 +6426,7 @@ function_call_generic:
}
}
/* Temporary placing the result of find_udf in $3 */
- lex->current_select->udf_list.push_front(udf);
+ $<udf>$= udf;
#endif
}
udf_expr_list ')'
@@ -6454,10 +6454,10 @@ function_call_generic:
{
#ifdef HAVE_DLOPEN
/* Retrieving the result of find_udf */
- udf_func *udf;
+ udf_func *udf= $<udf>3;
LEX *lex= Lex;
- if (NULL != (udf= lex->current_select->udf_list.pop()))
+ if (udf)
{
if (udf->type == UDFTYPE_AGGREGATE)
{
@@ -6553,7 +6553,6 @@ udf_expr_list3:
udf_expr:
remember_name expr remember_end select_alias
{
- udf_func *udf= Select->udf_list.head();
/*
Use Item::name as a storage for the attribute value of user
defined function argument. It is safe to use Item::name
@@ -6562,20 +6561,10 @@ udf_expr:
*/
if ($4.str)
{
- if (!udf)
- {
- /*
- Disallow using AS to specify explicit names for the arguments
- of stored routine calls
- */
- yyerror(ER(ER_SYNTAX_ERROR));
- YYABORT;
- }
-
$2->is_autogenerated_name= FALSE;
$2->set_name($4.str, $4.length, system_charset_info);
}
- else if (udf)
+ else
$2->set_name($1, (uint) ($3 - $1), YYTHD->charset());
$$= $2;
}