My Project
|
Public Member Functions | |
virtual Item * | create_func (THD *thd, LEX_STRING name, List< Item > *item_list) |
virtual Item * | create_native (THD *thd, LEX_STRING name, List< Item > *item_list)=0 |
Protected Member Functions | |
Create_native_func () | |
virtual | ~Create_native_func () |
Adapter for native functions with a variable number of arguments. The main use of this class is to discard the following calls: foo(expr1 AS name1, expr2 AS name2, ...)
which are syntactically correct (the syntax can refer to a UDF), but semantically invalid for native functions.
Create_native_func::Create_native_func | ( | ) | [inline, protected] |
Constructor.
virtual Create_native_func::~Create_native_func | ( | ) | [inline, protected, virtual] |
Destructor.
Item * Create_native_func::create_func | ( | THD * | thd, |
LEX_STRING | name, | ||
List< Item > * | item_list | ||
) | [virtual] |
The builder create method. Given the function name and list or arguments, this method creates an Item
that represents the function call. In case or errors, a NULL item is returned, and an error is reported. Note that the thd
object may be modified by the builder. In particular, the following members/methods can be set/called, depending on the function called and the function possible side effects.
thd->lex->binlog_row_based_if_mixed
thd->lex->current_context()
thd->lex->safe_to_cache_query
thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT)
thd->lex->uncacheable(UNCACHEABLE_RAND)
thd->lex->add_time_zone_tables_to_query_tables(thd)
thd | The current thread |
name | The function name |
item_list | The list of arguments to the function, can be NULL |
Implements Create_func.
virtual Item* Create_native_func::create_native | ( | THD * | thd, |
LEX_STRING | name, | ||
List< Item > * | item_list | ||
) | [pure virtual] |
Builder method, with no arguments.
thd | The current thread |
name | The native function name |
item_list | The function parameters, none of which are named |
Implemented in Create_func_year_week, Create_func_unix_timestamp, Create_func_round, Create_func_rand, Create_func_master_gtid_set_wait, Create_func_master_pos_wait, Create_func_make_set, Create_func_log, Create_func_locate, Create_func_least, Create_func_last_insert_id, Create_func_greatest, Create_func_from_unixtime, Create_func_field, Create_func_export_set, Create_func_encrypt, Create_func_elt, Create_func_des_encrypt, Create_func_des_decrypt, Create_func_concat_ws, Create_func_concat, Create_func_atan, and Create_func_aes_base.