Commit d2574b92 authored by unknown's avatar unknown

after review patch (SCRUM)


sql/sql_parse.cc:
  already fixed in right way
sql/udf_example.cc:
  not used function
tests/udf_test.res:
  added test of AS
tests/udf_test:
  added test of AS
parent 39fe2f6a
......@@ -2939,8 +2939,6 @@ mysql_execute_command(THD *thd)
break;
#ifdef HAVE_DLOPEN
sp_head *sph= sp_find_function(thd, &lex->udf.name);
// close & unlock table opened by sp_find_function
close_thread_tables(thd);
if (sph)
{
net_printf(thd, ER_UDF_EXISTS, lex->udf.name.str);
......
......@@ -991,7 +991,6 @@ avgcost( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error )
extern "C" {
my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
char *message);
void myfunc_argument_name_deinit(UDF_INIT *initid);
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *length, char *null_value,
char *error);
......@@ -1011,8 +1010,6 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
return 0;
}
void myfunc_argument_name_deinit(UDF_INIT *initid) {}
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *length, char *null_value,
char *error)
......
......@@ -21,7 +21,7 @@ create temporary table t1 (a int,b double);
insert into t1 values (1,5),(1,4),(2,8),(3,9),(4,11);
select avgcost(a,b) from t1;
select avgcost(a,b) from t1 group by a;
select a, myfunc_argument_name(a) from t1;
select a, myfunc_argument_name(a), myfunc_argument_name(a as b) from t1;
drop table t1;
DROP FUNCTION metaphon;
......
......@@ -116,12 +116,12 @@ avgcost(a,b)
select a, myfunc_argument_name(a) from t1;
--------------
a myfunc_argument_name(a)
1 a
1 a
2 a
3 a
4 a
a myfunc_argument_name(a) myfunc_argument_name(a as b)
1 a b
1 a b
2 a b
3 a b
4 a b
5 rows in set
--------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment