From 39ccc1d2e70f747846297e444ae3cc40aa170977 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Dec 2006 11:38:40 -0700 Subject: Apply malff@weblab.(none) fix for bug 24736 directly to mysql-5.1-build tree, in order to get it into mysql-5.1 faster. See comments from Marc's original push for patch details. --- sql/sql_yacc.yy | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'sql/sql_yacc.yy') 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; #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= $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; } -- cgit v1.2.1