mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
after review patch (SCRUM)
This commit is contained in:
@ -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
|
||||
|
||||
--------------
|
||||
|
Reference in New Issue
Block a user