Commit 0ffaf19c authored by Alexander Barkov's avatar Alexander Barkov

Adding a "const" qualifier to arguments of create_func(), create_native() etc

The "const" qualifier was obviously forgotten.

This change will also simpily fixing of MDEV-27744.
parent d271fbd3
...@@ -29,7 +29,8 @@ template <TR_table::field_id_t TRT_FIELD> ...@@ -29,7 +29,8 @@ template <TR_table::field_id_t TRT_FIELD>
class Create_func_trt : public Create_native_func class Create_func_trt : public Create_native_func
{ {
public: public:
virtual Item *create_native(THD *thd, LEX_CSTRING *name, List<Item> *item_list); virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list);
static Create_func_trt<TRT_FIELD> s_singleton; static Create_func_trt<TRT_FIELD> s_singleton;
...@@ -43,7 +44,7 @@ Create_func_trt<TRT_FIELD> Create_func_trt<TRT_FIELD>::s_singleton; ...@@ -43,7 +44,7 @@ Create_func_trt<TRT_FIELD> Create_func_trt<TRT_FIELD>::s_singleton;
template <TR_table::field_id_t TRT_FIELD> template <TR_table::field_id_t TRT_FIELD>
Item* Item*
Create_func_trt<TRT_FIELD>::create_native(THD *thd, LEX_CSTRING *name, Create_func_trt<TRT_FIELD>::create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) List<Item> *item_list)
{ {
Item *func= NULL; Item *func= NULL;
...@@ -102,7 +103,8 @@ template <class Item_func_trt_trx_seesX> ...@@ -102,7 +103,8 @@ template <class Item_func_trt_trx_seesX>
class Create_func_trt_trx_sees : public Create_native_func class Create_func_trt_trx_sees : public Create_native_func
{ {
public: public:
virtual Item *create_native(THD *thd, LEX_CSTRING *name, List<Item> *item_list) virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list)
{ {
Item *func= NULL; Item *func= NULL;
int arg_count= 0; int arg_count= 0;
......
This diff is collapsed.
...@@ -58,7 +58,8 @@ class Create_func ...@@ -58,7 +58,8 @@ class Create_func
@param item_list The list of arguments to the function, can be NULL @param item_list The list of arguments to the function, can be NULL
@return An item representing the parsed function call, or NULL @return An item representing the parsed function call, or NULL
*/ */
virtual Item *create_func(THD *thd, LEX_CSTRING *name, List<Item> *item_list) = 0; virtual Item *create_func(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) = 0;
protected: protected:
/** Constructor */ /** Constructor */
...@@ -79,7 +80,7 @@ class Create_func ...@@ -79,7 +80,7 @@ class Create_func
class Create_native_func : public Create_func class Create_native_func : public Create_func
{ {
public: public:
virtual Item *create_func(THD *thd, LEX_CSTRING *name, virtual Item *create_func(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list); List<Item> *item_list);
/** /**
...@@ -89,7 +90,7 @@ class Create_native_func : public Create_func ...@@ -89,7 +90,7 @@ class Create_native_func : public Create_func
@param item_list The function parameters, none of which are named @param item_list The function parameters, none of which are named
@return An item representing the function call @return An item representing the function call
*/ */
virtual Item *create_native(THD *thd, LEX_CSTRING *name, virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list) = 0; List<Item> *item_list) = 0;
protected: protected:
...@@ -117,7 +118,7 @@ class Create_qfunc : public Create_func ...@@ -117,7 +118,7 @@ class Create_qfunc : public Create_func
@param item_list The list of arguments to the function, can be NULL @param item_list The list of arguments to the function, can be NULL
@return An item representing the parsed function call @return An item representing the parsed function call
*/ */
virtual Item *create_func(THD *thd, LEX_CSTRING *name, virtual Item *create_func(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list); List<Item> *item_list);
/** /**
...@@ -129,7 +130,9 @@ class Create_qfunc : public Create_func ...@@ -129,7 +130,9 @@ class Create_qfunc : public Create_func
@param item_list The list of arguments to the function, can be NULL @param item_list The list of arguments to the function, can be NULL
@return An item representing the parsed function call @return An item representing the parsed function call
*/ */
virtual Item *create_with_db(THD *thd, LEX_CSTRING *db, LEX_CSTRING *name, virtual Item *create_with_db(THD *thd,
const LEX_CSTRING *db,
const LEX_CSTRING *name,
bool use_explicit_name, bool use_explicit_name,
List<Item> *item_list) = 0; List<Item> *item_list) = 0;
...@@ -167,7 +170,7 @@ extern Create_qfunc * find_qualified_function_builder(THD *thd); ...@@ -167,7 +170,7 @@ extern Create_qfunc * find_qualified_function_builder(THD *thd);
class Create_udf_func : public Create_func class Create_udf_func : public Create_func
{ {
public: public:
virtual Item *create_func(THD *thd, LEX_CSTRING *name, virtual Item *create_func(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list); List<Item> *item_list);
/** /**
......
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