summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authormalff/marcsql@weblab.(none) <>2006-12-01 19:16:03 -0700
committermalff/marcsql@weblab.(none) <>2006-12-01 19:16:03 -0700
commit88ba7676c1a506b941a61848ea01375ba13fcde1 (patch)
treedbc37abc8cf65f975fabf5b333c736277ff21297 /sql/item_create.cc
parentdc88e57744e8d9e09569710426f8c02dee1e1562 (diff)
downloadmariadb-git-88ba7676c1a506b941a61848ea01375ba13fcde1.tar.gz
Bug#24736: UDF functions parsed as Stored Functions
Before this fix, a call to a User Defined Function (UDF) could, under some circumstances, be interpreted as a call to a Stored function instead. This occurred if a native function was invoked in the parameters for the UDF, as in "select my_udf(abs(x))". The root cause of this defect is the introduction, by the fix for Bug 21809, of st_select_lex::udf_list, and it's usage in the parser in sql_yacc.yy in the rule function_call_generic (in 5.1). While the fix itself for Bug 21809 is correct in 5.0, the code change merged into the 5.1 release created the issue, because the calls in 5.1 to : - lex->current_select->udf_list.push_front(udf) - lex->current_select->udf_list.pop() are not balanced in case of native functions, causing the udf_list, which is really a stack, to be out of sync with the internal stack maintained by the bison parser. Instead of moving the call to udf_list.pop(), which would have fixed the symptom, this patch goes further and removes the need for udf_list. This is motivated by two reasons: a) Maintaining a stack in the MySQL code in sync with the stack maintained internally in sql_yacc.cc (not .yy) is extremely dependent of the implementation of yacc/bison, and extremely difficult to maintain. It's also totally dependent of the structure of the grammar, and has a risk to break with regression defects each time the grammar itself is changed. b) The previous code did report construct like "foo(expr AS name)" as syntax errors (ER_PARSER_ERROR), which is incorrect, and misleading. The syntax is perfectly valid, as this expression is valid when "foo" is a UDF. Whether this syntax is legal or not depends of the semantic of "foo". With this change: a) There is only one stack (in bison), and no List<udf_func> to maintain. b) "foo(expr AS name)", when used incorrectly, is reported as semantic error: - ER_WRONG_PARAMETERS_TO_NATIVE_FCT (for native functions) - ER_WRONG_PARAMETERS_TO_STORED_FCT (for stored functions) This is achieved by the changes implemented in item_create.cc
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc278
1 files changed, 200 insertions, 78 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 7722ce28d4a..6f77cc0fa14 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -28,6 +28,37 @@
*/
/**
+ Adapter for native functions with a variable number of arguments.
+ The main use of this class is to discard the following calls:
+ <code>foo(expr1 AS name1, expr2 AS name2, ...)</code>
+ which are syntactically correct (the syntax can refer to a UDF),
+ but semantically invalid for native functions.
+*/
+
+class Create_native_func : public Create_func
+{
+public:
+ virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+
+ /**
+ Builder method, with no arguments.
+ @param thd The current thread
+ @param name The native function name
+ @param item_list The function parameters, none of which are named
+ @return An item representing the function call
+ */
+ virtual Item* create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list) = 0;
+
+protected:
+ /** Constructor. */
+ Create_native_func() {}
+ /** Destructor. */
+ virtual ~Create_native_func() {}
+};
+
+
+/**
Adapter for functions that takes exactly zero arguments.
*/
@@ -302,10 +333,10 @@ protected:
};
-class Create_func_atan : public Create_func
+class Create_func_atan : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_atan s_singleton;
@@ -434,10 +465,10 @@ protected:
};
-class Create_func_concat : public Create_func
+class Create_func_concat : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_concat s_singleton;
@@ -447,10 +478,10 @@ protected:
};
-class Create_func_concat_ws : public Create_func
+class Create_func_concat_ws : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_concat_ws s_singleton;
@@ -672,10 +703,10 @@ protected:
};
-class Create_func_des_decrypt : public Create_func
+class Create_func_des_decrypt : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_des_decrypt s_singleton;
@@ -685,10 +716,10 @@ protected:
};
-class Create_func_des_encrypt : public Create_func
+class Create_func_des_encrypt : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_des_encrypt s_singleton;
@@ -728,10 +759,10 @@ protected:
#endif
-class Create_func_elt : public Create_func
+class Create_func_elt : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_elt s_singleton;
@@ -754,10 +785,10 @@ protected:
};
-class Create_func_encrypt : public Create_func
+class Create_func_encrypt : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_encrypt s_singleton;
@@ -825,10 +856,10 @@ protected:
};
-class Create_func_export_set : public Create_func
+class Create_func_export_set : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_export_set s_singleton;
@@ -853,10 +884,10 @@ protected:
#endif
-class Create_func_field : public Create_func
+class Create_func_field : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_field s_singleton;
@@ -931,10 +962,10 @@ protected:
};
-class Create_func_from_unixtime : public Create_func
+class Create_func_from_unixtime : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_from_unixtime s_singleton;
@@ -945,10 +976,10 @@ protected:
#ifdef HAVE_SPATIAL
-class Create_func_geometry_from_text : public Create_func
+class Create_func_geometry_from_text : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_geometry_from_text s_singleton;
@@ -960,10 +991,10 @@ protected:
#ifdef HAVE_SPATIAL
-class Create_func_geometry_from_wkb : public Create_func
+class Create_func_geometry_from_wkb : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_geometry_from_wkb s_singleton;
@@ -1032,10 +1063,10 @@ protected:
#endif
-class Create_func_greatest : public Create_func
+class Create_func_greatest : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_greatest s_singleton;
@@ -1237,10 +1268,10 @@ protected:
};
-class Create_func_last_insert_id : public Create_func
+class Create_func_last_insert_id : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_last_insert_id s_singleton;
@@ -1263,10 +1294,10 @@ protected:
};
-class Create_func_least : public Create_func
+class Create_func_least : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_least s_singleton;
@@ -1315,10 +1346,10 @@ protected:
};
-class Create_func_locate : public Create_func
+class Create_func_locate : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_locate s_singleton;
@@ -1328,10 +1359,10 @@ protected:
};
-class Create_func_log : public Create_func
+class Create_func_log : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_log s_singleton;
@@ -1419,10 +1450,10 @@ protected:
};
-class Create_func_make_set : public Create_func
+class Create_func_make_set : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_make_set s_singleton;
@@ -1432,10 +1463,10 @@ protected:
};
-class Create_func_master_pos_wait : public Create_func
+class Create_func_master_pos_wait : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_master_pos_wait s_singleton;
@@ -1676,10 +1707,10 @@ protected:
};
-class Create_func_rand : public Create_func
+class Create_func_rand : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_rand s_singleton;
@@ -1715,10 +1746,10 @@ protected:
};
-class Create_func_round : public Create_func
+class Create_func_round : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_round s_singleton;
@@ -2085,10 +2116,10 @@ protected:
};
-class Create_func_unix_timestamp : public Create_func
+class Create_func_unix_timestamp : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_unix_timestamp s_singleton;
@@ -2221,10 +2252,10 @@ protected:
#endif
-class Create_func_year_week : public Create_func
+class Create_func_year_week : public Create_native_func
{
public:
- virtual Item* create(THD *thd, LEX_STRING name, List<Item> *item_list);
+ virtual Item* create_native(THD *thd, LEX_STRING name, List<Item> *item_list);
static Create_func_year_week s_singleton;
@@ -2240,6 +2271,29 @@ protected:
=============================================================================
*/
+/**
+ Checks if there are named parameters in a parameter list.
+ The syntax to name parameters in a function call is as follow:
+ <code>foo(expr AS named, expr named, expr AS "named", expr "named")</code>
+ @param params The parameter list, can be null
+ @return true if one or more parameter is named
+*/
+static bool has_named_parameters(List<Item> *params)
+{
+ if (params)
+ {
+ Item *param;
+ List_iterator<Item> it(*params);
+ while ((param= it++))
+ {
+ if (! param->is_autogenerated_name)
+ return true;
+ }
+ }
+
+ return false;
+}
+
#ifndef HAVE_SPATIAL
Create_func_no_geom Create_func_no_geom::s_singleton;
@@ -2387,11 +2441,27 @@ Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name,
int arg_count= 0;
Item *func= NULL;
LEX *lex= thd->lex;
- sp_name *qname= new (thd->mem_root) sp_name(db, name);
+ sp_name *qname;
+
+ if (has_named_parameters(item_list))
+ {
+ /*
+ The syntax "db.foo(expr AS p1, expr AS p2, ...) is invalid,
+ and has been rejected during syntactic parsing already,
+ because a stored function call may not have named parameters.
+
+ The syntax "foo(expr AS p1, expr AS p2, ...)" is correct,
+ because it can refer to a User Defined Function call.
+ For a Stored Function however, this has no semantic.
+ */
+ my_error(ER_WRONG_PARAMETERS_TO_STORED_FCT, MYF(0), name.str);
+ return NULL;
+ }
if (item_list != NULL)
arg_count= item_list->elements;
+ qname= new (thd->mem_root) sp_name(db, name);
qname->init_qname(thd);
sp_add_used_routine(lex, thd, qname, TYPE_ENUM_FUNCTION);
@@ -2407,6 +2477,19 @@ Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name,
Item*
+Create_native_func::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+{
+ if (has_named_parameters(item_list))
+ {
+ my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), name.str);
+ return NULL;
+ }
+
+ return create_native(thd, name, item_list);
+}
+
+
+Item*
Create_func_arg0::create(THD *thd, LEX_STRING name, List<Item> *item_list)
{
int arg_count= 0;
@@ -2439,6 +2522,13 @@ Create_func_arg1::create(THD *thd, LEX_STRING name, List<Item> *item_list)
}
Item *param_1= item_list->pop();
+
+ if (! param_1->is_autogenerated_name)
+ {
+ my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), name.str);
+ return NULL;
+ }
+
return create(thd, param_1);
}
@@ -2459,6 +2549,14 @@ Create_func_arg2::create(THD *thd, LEX_STRING name, List<Item> *item_list)
Item *param_1= item_list->pop();
Item *param_2= item_list->pop();
+
+ if ( (! param_1->is_autogenerated_name)
+ || (! param_2->is_autogenerated_name))
+ {
+ my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), name.str);
+ return NULL;
+ }
+
return create(thd, param_1, param_2);
}
@@ -2480,6 +2578,15 @@ Create_func_arg3::create(THD *thd, LEX_STRING name, List<Item> *item_list)
Item *param_1= item_list->pop();
Item *param_2= item_list->pop();
Item *param_3= item_list->pop();
+
+ if ( (! param_1->is_autogenerated_name)
+ || (! param_2->is_autogenerated_name)
+ || (! param_3->is_autogenerated_name))
+ {
+ my_error(ER_WRONG_PARAMETERS_TO_NATIVE_FCT, MYF(0), name.str);
+ return NULL;
+ }
+
return create(thd, param_1, param_2, param_3);
}
@@ -2574,7 +2681,8 @@ Create_func_asin::create(THD *thd, Item *arg1)
Create_func_atan Create_func_atan::s_singleton;
Item*
-Create_func_atan::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_atan::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item* func= NULL;
int arg_count= 0;
@@ -2694,7 +2802,8 @@ Create_func_coercibility::create(THD *thd, Item *arg1)
Create_func_concat Create_func_concat::s_singleton;
Item*
-Create_func_concat::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_concat::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -2714,7 +2823,8 @@ Create_func_concat::create(THD *thd, LEX_STRING name, List<Item> *item_list)
Create_func_concat_ws Create_func_concat_ws::s_singleton;
Item*
-Create_func_concat_ws::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_concat_ws::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -2914,8 +3024,8 @@ Create_func_degrees::create(THD *thd, Item *arg1)
Create_func_des_decrypt Create_func_des_decrypt::s_singleton;
Item*
-Create_func_des_decrypt::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_des_decrypt::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -2951,8 +3061,8 @@ Create_func_des_decrypt::create(THD *thd, LEX_STRING name,
Create_func_des_encrypt Create_func_des_encrypt::s_singleton;
Item*
-Create_func_des_encrypt::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_des_encrypt::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3011,7 +3121,8 @@ Create_func_disjoint::create(THD *thd, Item *arg1, Item *arg2)
Create_func_elt Create_func_elt::s_singleton;
Item*
-Create_func_elt::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_elt::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -3050,7 +3161,8 @@ Create_func_encode::create(THD *thd, Item *arg1, Item *arg2)
Create_func_encrypt Create_func_encrypt::s_singleton;
Item*
-Create_func_encrypt::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_encrypt::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3131,7 +3243,8 @@ Create_func_exp::create(THD *thd, Item *arg1)
Create_func_export_set Create_func_export_set::s_singleton;
Item*
-Create_func_export_set::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_export_set::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3195,7 +3308,8 @@ Create_func_exteriorring::create(THD *thd, Item *arg1)
Create_func_field Create_func_field::s_singleton;
Item*
-Create_func_field::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_field::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -3268,8 +3382,8 @@ Create_func_from_days::create(THD *thd, Item *arg1)
Create_func_from_unixtime Create_func_from_unixtime::s_singleton;
Item*
-Create_func_from_unixtime::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_from_unixtime::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3307,8 +3421,8 @@ Create_func_from_unixtime::create(THD *thd, LEX_STRING name,
Create_func_geometry_from_text Create_func_geometry_from_text::s_singleton;
Item*
-Create_func_geometry_from_text::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_geometry_from_text::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3347,8 +3461,8 @@ Create_func_geometry_from_text::create(THD *thd, LEX_STRING name,
Create_func_geometry_from_wkb Create_func_geometry_from_wkb::s_singleton;
Item*
-Create_func_geometry_from_wkb::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_geometry_from_wkb::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3430,7 +3544,8 @@ Create_func_glength::create(THD *thd, Item *arg1)
Create_func_greatest Create_func_greatest::s_singleton;
Item*
-Create_func_greatest::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_greatest::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -3590,8 +3705,8 @@ Create_func_last_day::create(THD *thd, Item *arg1)
Create_func_last_insert_id Create_func_last_insert_id::s_singleton;
Item*
-Create_func_last_insert_id::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_last_insert_id::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3636,7 +3751,8 @@ Create_func_lcase::create(THD *thd, Item *arg1)
Create_func_least Create_func_least::s_singleton;
Item*
-Create_func_least::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_least::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -3684,7 +3800,8 @@ Create_func_load_file::create(THD *thd, Item *arg1)
Create_func_locate Create_func_locate::s_singleton;
Item*
-Create_func_locate::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_locate::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3724,7 +3841,8 @@ Create_func_locate::create(THD *thd, LEX_STRING name, List<Item> *item_list)
Create_func_log Create_func_log::s_singleton;
Item*
-Create_func_log::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_log::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -3814,7 +3932,8 @@ Create_func_maketime::create(THD *thd, Item *arg1, Item *arg2, Item *arg3)
Create_func_make_set Create_func_make_set::s_singleton;
Item*
-Create_func_make_set::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_make_set::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
int arg_count= 0;
@@ -3835,8 +3954,8 @@ Create_func_make_set::create(THD *thd, LEX_STRING name, List<Item> *item_list)
Create_func_master_pos_wait Create_func_master_pos_wait::s_singleton;
Item*
-Create_func_master_pos_wait::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_master_pos_wait::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -4044,7 +4163,8 @@ Create_func_radians::create(THD *thd, Item *arg1)
Create_func_rand Create_func_rand::s_singleton;
Item*
-Create_func_rand::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_rand::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -4099,7 +4219,8 @@ Create_func_reverse::create(THD *thd, Item *arg1)
Create_func_round Create_func_round::s_singleton;
Item*
-Create_func_round::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_round::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -4408,8 +4529,8 @@ Create_func_unhex::create(THD *thd, Item *arg1)
Create_func_unix_timestamp Create_func_unix_timestamp::s_singleton;
Item*
-Create_func_unix_timestamp::create(THD *thd, LEX_STRING name,
- List<Item> *item_list)
+Create_func_unix_timestamp::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
@@ -4540,7 +4661,8 @@ Create_func_y::create(THD *thd, Item *arg1)
Create_func_year_week Create_func_year_week::s_singleton;
Item*
-Create_func_year_week::create(THD *thd, LEX_STRING name, List<Item> *item_list)
+Create_func_year_week::create_native(THD *thd, LEX_STRING name,
+ List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;