Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1994 05/09/22 11:39:01 ramil@stripped +1 -0
Merge rkalimullin@stripped:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b11553
sql/sql_yacc.yy
1.430 05/09/22 11:38:53 ramil@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/5.0.b11553/RESYNC
--- 1.429/sql/sql_yacc.yy 2005-09-21 20:42:28 +05:00
+++ 1.430/sql/sql_yacc.yy 2005-09-22 11:38:53 +05:00
@@ -4779,27 +4779,48 @@
$$= new Item_func_sp(Lex->current_context(), name);
lex->safe_to_cache_query=0;
}
- | IDENT_sys '(' udf_expr_list ')'
+ | IDENT_sys '('
{
#ifdef HAVE_DLOPEN
- udf_func *udf;
+ udf_func *udf= 0;
+ if (using_udf_functions &&
+ (udf= find_udf($1.str, $1.length)) &&
+ udf->type == UDFTYPE_AGGREGATE)
+ {
+ LEX *lex= Lex;
+ if (lex->current_select->inc_in_sum_expr())
+ {
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ }
+ }
+ $<udf>$= udf;
+#endif
+ }
+ udf_expr_list ')'
+ {
+#ifdef HAVE_DLOPEN
+ udf_func *udf= $<udf>3;
SELECT_LEX *sel= Select;
- if (using_udf_functions && (udf=find_udf($1.str, $1.length)))
+ if (udf)
{
+ if (udf->type == UDFTYPE_AGGREGATE)
+ Select->in_sum_expr--;
+
switch (udf->returns) {
case STRING_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
- if ($3 != NULL)
- $$ = new Item_func_udf_str(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_func_udf_str(udf, *$4);
else
$$ = new Item_func_udf_str(udf);
}
else
{
- if ($3 != NULL)
- $$ = new Item_sum_udf_str(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_sum_udf_str(udf, *$4);
else
$$ = new Item_sum_udf_str(udf);
}
@@ -4807,15 +4828,15 @@
case REAL_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
- if ($3 != NULL)
- $$ = new Item_func_udf_float(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_func_udf_float(udf, *$4);
else
$$ = new Item_func_udf_float(udf);
}
else
{
- if ($3 != NULL)
- $$ = new Item_sum_udf_float(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_sum_udf_float(udf, *$4);
else
$$ = new Item_sum_udf_float(udf);
}
@@ -4823,15 +4844,15 @@
case INT_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
- if ($3 != NULL)
- $$ = new Item_func_udf_int(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_func_udf_int(udf, *$4);
else
$$ = new Item_func_udf_int(udf);
}
else
{
- if ($3 != NULL)
- $$ = new Item_sum_udf_int(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_sum_udf_int(udf, *$4);
else
$$ = new Item_sum_udf_int(udf);
}
@@ -4839,15 +4860,15 @@
case DECIMAL_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
- if ($3 != NULL)
- $$ = new Item_func_udf_decimal(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_func_udf_decimal(udf, *$4);
else
$$ = new Item_func_udf_decimal(udf);
}
else
{
- if ($3 != NULL)
- $$ = new Item_sum_udf_decimal(udf, *$3);
+ if ($4 != NULL)
+ $$ = new Item_sum_udf_decimal(udf, *$4);
else
$$ = new Item_sum_udf_decimal(udf);
}
@@ -4863,8 +4884,8 @@
sp_name *name= sp_name_current_db_new(YYTHD, $1);
sp_add_used_routine(lex, YYTHD, name, TYPE_ENUM_FUNCTION);
- if ($3)
- $$= new Item_func_sp(Lex->current_context(), name, *$3);
+ if ($4)
+ $$= new Item_func_sp(Lex->current_context(), name, *$4);
else
$$= new Item_func_sp(Lex->current_context(), name);
lex->safe_to_cache_query=0;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1994) | ramil | 22 Sep |