mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
after review patch (SCRUM)
This commit is contained in:
@ -2939,8 +2939,6 @@ mysql_execute_command(THD *thd)
|
|||||||
break;
|
break;
|
||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
sp_head *sph= sp_find_function(thd, &lex->udf.name);
|
sp_head *sph= sp_find_function(thd, &lex->udf.name);
|
||||||
// close & unlock table opened by sp_find_function
|
|
||||||
close_thread_tables(thd);
|
|
||||||
if (sph)
|
if (sph)
|
||||||
{
|
{
|
||||||
net_printf(thd, ER_UDF_EXISTS, lex->udf.name.str);
|
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" {
|
extern "C" {
|
||||||
my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
|
my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
|
||||||
char *message);
|
char *message);
|
||||||
void myfunc_argument_name_deinit(UDF_INIT *initid);
|
|
||||||
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *length, char *null_value,
|
unsigned long *length, char *null_value,
|
||||||
char *error);
|
char *error);
|
||||||
@ -1011,8 +1010,6 @@ my_bool myfunc_argument_name_init(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void myfunc_argument_name_deinit(UDF_INIT *initid) {}
|
|
||||||
|
|
||||||
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *myfunc_argument_name(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *length, char *null_value,
|
unsigned long *length, char *null_value,
|
||||||
char *error)
|
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);
|
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;
|
||||||
select avgcost(a,b) from t1 group by a;
|
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 table t1;
|
||||||
|
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
|
@ -116,12 +116,12 @@ avgcost(a,b)
|
|||||||
select a, myfunc_argument_name(a) from t1;
|
select a, myfunc_argument_name(a) from t1;
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
a myfunc_argument_name(a)
|
a myfunc_argument_name(a) myfunc_argument_name(a as b)
|
||||||
1 a
|
1 a b
|
||||||
1 a
|
1 a b
|
||||||
2 a
|
2 a b
|
||||||
3 a
|
3 a b
|
||||||
4 a
|
4 a b
|
||||||
5 rows in set
|
5 rows in set
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
Reference in New Issue
Block a user