MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Create_native_func Class Reference
Inheritance diagram for Create_native_func:
Collaboration diagram for Create_native_func:

Public Member Functions

virtual Itemcreate_func (THD *thd, LEX_STRING name, List< Item > *item_list)
virtual Itemcreate_native (THD *thd, LEX_STRING name, List< Item > *item_list)=0

Protected Member Functions

 Create_native_func ()
virtual ~Create_native_func ()
- Protected Member Functions inherited from Create_func
 Create_func ()
virtual ~Create_func ()

Detailed Description

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.

Definition at line 51 of file item_create.cc.

Constructor & Destructor Documentation

Create_native_func::Create_native_func ( )
inlineprotected

Constructor.

Definition at line 68 of file item_create.cc.

virtual Create_native_func::~Create_native_func ( )
inlineprotectedvirtual

Destructor.

Definition at line 70 of file item_create.cc.

Member Function Documentation

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)
Parameters
thdThe current thread
nameThe function name
item_listThe list of arguments to the function, can be NULL
Returns
An item representing the parsed function call, or NULL

Implements Create_func.

Definition at line 2877 of file item_create.cc.

Here is the call graph for this function:

virtual Item* Create_native_func::create_native ( THD *  thd,
LEX_STRING  name,
List< Item > *  item_list 
)
pure virtual

Builder method, with no arguments.

Parameters
thdThe current thread
nameThe native function name
item_listThe function parameters, none of which are named
Returns
An item representing the function call

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, and Create_func_atan.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: